-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(github): add graph to GitHub Actions #3672
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really great. I think we should add at least 1 or 2 checks and verify they are packaged correctly in checkov. WDYT?
tought about it, but had no good idea, which were unique for a graph check, but I will add something simple 😄 |
# Conflicts: # checkov/common/runners/object_runner.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
failing_resources = { | ||
"jobs.attest.steps.5", | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that compatible with the resource ids already generated for steps with the python checks? I think that the format for step resources should be 'jobs.<job_name>.steps.<step_name>'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the name
field is optional and you can name all your steps the same, so if we use this in Python checks, we probably should reconsider it. only the order is relevant at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool 🔥
Had only one comment regarding the resource ids
* add graph capabilities to ObjectRunner * add graph to GitHub Actions * fix Python 3.11 issue * add permissions vertices and adjust docs * fix PR comments * add CKV2_GHA_1 to scan for top-level permissions * fix argument name in kubernetes graph manager * add GHA grpah checks to doc generator * adjust test entities * adjust the log level * adjust GHA step name * fix linting * fix mypy
* add graph capabilities to ObjectRunner * add graph to GitHub Actions * fix Python 3.11 issue * add permissions vertices and adjust docs * fix PR comments * add CKV2_GHA_1 to scan for top-level permissions * fix argument name in kubernetes graph manager * add GHA grpah checks to doc generator * adjust test entities * adjust the log level * adjust GHA step name * fix linting * fix mypy
* add graph capabilities to ObjectRunner * add graph to GitHub Actions * fix Python 3.11 issue * add permissions vertices and adjust docs * fix PR comments * add CKV2_GHA_1 to scan for top-level permissions * fix argument name in kubernetes graph manager * add GHA grpah checks to doc generator * adjust test entities * adjust the log level * adjust GHA step name * fix linting * fix mypy
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
ObjectRunner
to make it easier to add graphs to other runnersjobs
andsteps
asresource_types
and edges between themCKV2_GHA_1
which ensures the user doesn't givewrite-all
permission on the top-levelex.
Checklist: