Skip to content

feat: unsecure-commands-allowed audit - #176

Merged
woodruffw merged 5 commits into
zizmorcore:mainfrom
tewokumu:ufs/patch-04
Nov 19, 2024
Merged

feat: unsecure-commands-allowed audit#176
woodruffw merged 5 commits into
zizmorcore:mainfrom
tewokumu:ufs/patch-04

Conversation

@ubiratansoares

@ubiratansoares ubiratansoares commented Nov 18, 2024

Copy link
Copy Markdown
Contributor

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

ubiratansoares commented Nov 18, 2024

Copy link
Copy Markdown
Contributor Author

Testing this PR :

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

@woodruffw woodruffw left a comment

Copy link
Copy Markdown
Member

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!)

Comment thread src/audit/unsecure_commands_allowed.rs Outdated
Comment thread src/audit/unsecure_commands_allowed.rs Outdated
Comment thread src/audit/unsecure_commands_allowed.rs Outdated
Comment thread src/audit/unsecure_commands_allowed.rs Outdated
@woodruffw woodruffw added enhancement New feature or request new-audit New audits labels Nov 19, 2024
@ubiratansoares

Copy link
Copy Markdown
Contributor Author

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

@woodruffw

Copy link
Copy Markdown
Member

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 <william@yossarian.net>
Signed-off-by: William Woodruff <william@yossarian.net>

@woodruffw woodruffw left a comment

Copy link
Copy Markdown
Member

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 zizmorcore:main Nov 19, 2024
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