You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: mitigating script injection attacks by passing issue body as env var (#42)
BREAKING CHANGE: Add `issue-body` argument which is required from v3 onwards
To mitigate script injection attacks, github-issue-parser v3 will require workflow authors to pass the issue body as an argument. By doing so you will follow GitHub's [Good practices for mitigating script injection attacks
](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#good-practices-for-mitigating-script-injection-attacks)
```yml
- uses: stefanbuck/github-issue-parser@v3
id: issue-parser
with:
issue-body: ${{ github.event.issue.body }} # required
template-path: .github/ISSUE_TEMPLATE/bug-report.yml # optional but recommended
```
Please take a look at GitHub's [Good practices for mitigating script injection attacks](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#good-practices-for-mitigating-script-injection-attacks) when using inline scripts. The examples blow are safe because they use intermediate environment variable as suggested by GitHub.
Want to learn more about this concept? Check out the [Codeless Contributions with GitHub Issue Forms](https://stefanbuck.com/blog/codeless-contributions-with-github-issue-forms) post on my blog.
0 commit comments