-
Notifications
You must be signed in to change notification settings - Fork 509
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: SAST and CI-Tests wrongly succeed when action is enabled #1420
Comments
@azeemsgoogle is this something you'd like to add to the repo interface, i.e. a way to retrieve the tool name from the run/Slug? |
U |
|
It seems non-intuitive to me that users can't improve their SAST/CI scores by enabling Scorecard actions. We shouldn't ignore Scorecard action in these checks IMO. If these checks seem to "wrongly succeed", then I would argue that the way we dole out points in these checks is where the problem lies. Maybe we should re-think the scoring system in these checks instead? |
good idea. I initially thought scorecard should be running silently in the background and not affect the results. But you make a good point.
I agree the scoring system is not great for those checks. I think it requires more information about SAST tools. Originally I wanted to classify what features or vulnerability classes each tool can find, but this seems too ambitious at this point. A more accessible scoring could be:
Until we get there, we could maybe start by implementing point 2, ie give 3 points for scorecard as supply-chain tool. wdut? For CI-Tests check, I'm not sure what we should do. The check is currently coarse . Maybe we can keep it as-is for the time being? |
Discussed offline: can update the SAST check to use |
I did some digging and I don't think listing workflow runs works. The SAST check uses the Check API because it allows listing not just workflow runs, but also GitHub apps. See doc in https://docs.github.com/en/rest/reference/checks |
updates: GitHub runs apps. Some apps include I'll start a PR that follows this structure: #1420 (comment) |
there is an additional complication I've encountered: |
Hmm, tricky. The API allows us to filter by |
an alternative (first iteration) solution we may consider is to identify workflows by their names, and map these names to the check run's name. So we would:
There are corner cases, e.g. if a dev gives the exact same name to 2 different workflow, or if someone has update the workflow name... But this may be a good first step to improve the check until we're able to get workflow runs for a particular PR. wduy? |
follow-up on my last comment. The name in the check run is
I've checked the partnered workflows for code scanning https://github.com/actions/starter-workflows/blob/main/code-scanning and found that
On a related note: this list of scanning tools may be a good list to support |
I think I found a way to do this. Check runs have a |
SAST and CI-Test use the
PR.App.Slug
field to determine if a SAST/CI tool is used. When running scorecard's GitHub action, we detect our own action as a SAST/CI tool.We should exclude it. The URL can be used to determine the name of the tool run, e.g., https://api.github.com/repos/laurentsimon/scorecard-action-test-3/check-runs/4143313445
The text was updated successfully, but these errors were encountered: