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

haskell-actions/hlint-scan is not considered a code scanning action #2840

Closed
chungyc opened this issue Apr 8, 2023 · 3 comments · Fixed by #2846
Closed

haskell-actions/hlint-scan is not considered a code scanning action #2840

chungyc opened this issue Apr 8, 2023 · 3 comments · Fixed by #2846
Labels

Comments

@chungyc
Copy link
Contributor

chungyc commented Apr 8, 2023

Describe the bug

haskell-actions/hlint-scan is a GitHub action explicitly for uploading SARIF files to GitHub code scanning. However, Scorecard does not consider it as such and reports a "Token-Permissions" issue:

score is 8: jobLevel 'security-events' permission set to 'write'
Remediation tip: Verify which permissions are needed and consider whether you can reduce them.

However, Scorecard is not supposed to report the use of the security-events write permission if the action is recognized as a code scanning action:

However, points are not reduced if the job utilizes a recognized action for uploading SARIF results.

Reproduction steps

Steps to reproduce the behavior:

  1. Set up a GitHub project.
  2. Add Haskell code with some poor choices. E.g., main = concat . map id ([1,2,3]).
  3. Set up haskell-actions/hlint-scan in a workflow for the project.
  4. Manually run the workflow.

Expected behavior

Scorecard recognizes haskell-actions/hlint-scan as an action uploading SARIF results. The use of the security-events write permission should not be reported as an issue.

Additional context

haskell-actions/hlint-scan uses HLint, which scans for issues in Haskell code and suggests improvements.

@chungyc chungyc added the kind/bug Something isn't working label Apr 8, 2023
@naveensrinivasan
Copy link
Member

@chungyc Would you be interested in sending a PR for this?

@chungyc
Copy link
Contributor Author

chungyc commented Apr 10, 2023

Yes, I intend to, once I've resolved #2830.

@chungyc
Copy link
Contributor Author

chungyc commented Apr 10, 2023

It turns out that this does not need #2830 to be resolved first, so I opened the pull request #2846.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants