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

Missing injection sources #71

Open
fproulx-boostsecurity opened this issue May 9, 2024 · 0 comments
Open

Missing injection sources #71

fproulx-boostsecurity opened this issue May 9, 2024 · 0 comments

Comments

@fproulx-boostsecurity
Copy link
Contributor

fproulx-boostsecurity commented May 9, 2024

The current injection sources regex

patterns.github contains "\\$\\{\\{\\s*(github\\.head_ref|github\\.event\\.workflow_run\\.(head_branch|head_repository\\.description|head_repository\\.owner\\.email|pull_requests[^}]+?(head\\.ref|head\\.repo\\.name))|github\\.event\\.(issue\\.title|issue\\.body|pull_request\\.title|pull_request\\.body|comment\\.body|review\\.body|review_comment\\.body|pages\\.[^}]+?\\.page_name|head_commit\\.message|head_commit\\.author\\.email|head_commit\\.author\\.name|commits[^}]+?\\.author\\.email|commits[^}]+?\\.author\\.name|pull_request\\.head\\.ref|pull_request\\.head\\.label|pull_request\\.head\\.repo\\.default_branch|(inputs|client_payload)[^}]+?))\\s*\\}\\}"

Is missing various sources, some of which are in messypoutine
https://github.com/messypoutine/gravy-overflow/blob/main/.github/workflows/level1.yml#L46

Such as github.event.workflow_run.head_commit.message

In fact looking at semgrep rule there are a few more we can just get there https://github.com/semgrep/semgrep-rules/blob/develop/yaml/github-actions/security/github-script-injection.yaml#L52-L69

Semgrep's list is missing this one for instance github.event.pull_request.head.repo.description https://github.com/messypoutine/gravy-overflow/blob/4bdd38801e7e37238c1c4282d29dbd8aa0ba520c/.github/workflows/level0.yml#L138

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

No branches or pull requests

1 participant