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

feat: unsecure-commands-allowed audit #176

Merged
merged 5 commits into from
Nov 19, 2024

Conversation

ubiratansoares
Copy link
Contributor

@ubiratansoares ubiratansoares commented Nov 18, 2024

Adds a new unsecure-commands-allowed, as per described in #171

We should be able to detect opt-in for ACTIONS_ALLOW_UNSECURE_COMMANDS in all possible contexts, namely workflow.env, job.env and step.env. I covered both reusable and normal jobs, hope I did not miss anything. Added some integration tests as well.

Closes #171

@ubiratansoares
Copy link
Contributor Author

ubiratansoares commented Nov 18, 2024

Testing this PR :

  • Pull this branch
  • Run
cargo run -- tests/test-data/unsecure-commands-allowed.yml

Copy link
Owner

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ubiratansoares, this looks fantastic! A couple of small comments/nitpicks.

(Could you also add a docs section for this new audit, under the pre-existing audit.md? The other documentation there should be a good reference!)

src/audit/unsecure_commands_allowed.rs Outdated Show resolved Hide resolved
src/audit/unsecure_commands_allowed.rs Outdated Show resolved Hide resolved
src/audit/unsecure_commands_allowed.rs Outdated Show resolved Hide resolved
src/audit/unsecure_commands_allowed.rs Outdated Show resolved Hide resolved
@woodruffw woodruffw added enhancement New feature or request new-audit New audits labels Nov 19, 2024
@ubiratansoares
Copy link
Contributor Author

@woodruffw Added some docs here. Hope everything looks fine 🚀

@woodruffw
Copy link
Owner

Thanks a ton @ubiratansoares, this looks great!

I'll take over the PR to do a bit of small polishing, and then merge it.

Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Copy link
Owner

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @ubiratansoares!

@woodruffw woodruffw enabled auto-merge (squash) November 19, 2024 21:10
@woodruffw woodruffw merged commit 5756280 into woodruffw:main Nov 19, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new-audit New audits
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New audit: ACTIONS_ALLOW_UNSECURE_COMMANDS
2 participants