Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Internal error when parsing Dockerfile on Pinned-Dependencies check #3692

Open
joycebrum opened this issue Nov 23, 2023 · 1 comment
Open
Labels

Comments

@joycebrum
Copy link
Contributor

Describe the bug
When running the pinned dependencies check, a parsing error is occurring and no score is calculated. The error is because of this line Dockerfile:1:184

Reproduction steps
Versions: 4.10.2, 4.10.5 and 4.13.1
Last tensorflow commit that was running without error: 2bc270a640c17fffb865b225c9fc5d69e80c1dc9
Steps to reproduce the behavior:

  1. run scorecard --repo=tensorflow/tensorflow --checks=Pinned-Dependencies
  2. output
Starting [Pinned-Dependencies]
Finished [Pinned-Dependencies]

RESULTS
-------
Aggregate score: ?

Check scores:
|-------|---------------------|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------|
| SCORE |        NAME         |                    REASON                    |                                             DOCUMENTATION/REMEDIATION                                              |
|-------|---------------------|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------|
| ?     | Pinned-Dependencies | internal error: error parsing shell code:    | https://github.com/ossf/scorecard/blob/49c0eed3a423f00c872b5c3c9f1bbca9e8aae799/docs/checks.md#pinned-dependencies |
|       |                     | ci/devinfra/docker_windows/Dockerfile:1:184: |                                                                                                                    |
|       |                     | a command can only contain words and         |                                                                                                                    |
|       |                     | redirects; encountered (                     |                                                                                                                    |
|-------|---------------------|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------|
Error: check runtime error: Pinned-Dependencies: internal error: error parsing shell code: ci/devinfra/docker_windows/Dockerfile:1:184: a command can only contain words and redirects; encountered (
2023/11/23 19:41:36 error during command execution: check runtime error: Pinned-Dependencies: internal error: error parsing shell code: ci/devinfra/docker_windows/Dockerfile:1:184: a command can only contain words and redirects; encountered (

Expected behavior
It was expected that the score could be calculated. The Dockerfile seems to be working well on tensorflow

@joycebrum joycebrum added the kind/bug Something isn't working label Nov 23, 2023
@joycebrum joycebrum changed the title BUG: Pinned Dependencies Check is not working on tensorflow. BUG: Internal error en parsing Dockerfile on Pinned-Dependencies check Nov 23, 2023
@joycebrum joycebrum changed the title BUG: Internal error en parsing Dockerfile on Pinned-Dependencies check BUG: Internal error when parsing Dockerfile on Pinned-Dependencies check Nov 23, 2023
@spencerschrock
Copy link
Contributor

Based on the error I'm not sure that's actually the line causing the error.

a command can only contain words and redirects; encountered (

But seems like this is another example of us trying to parse powershell as a shell script, which would solve quite a few of these issues. A short term solution would be ignoring the parse error via #3515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog - Bugs
Development

No branches or pull requests

2 participants