Skip to content

Commit

Permalink
chore: fixed the Dangerous-Workflow (#578)
Browse files Browse the repository at this point in the history
## Description
Fixed the dangerous workflow
`Warn: script injection with untrusted input '
github.event.pull_request.title ': .github/workflows/commitlint.yml:28`


https://securityscorecards.dev/viewer/?uri=github.com/defenseunicorns/pepr

https://securitylab.github.com/research/github-actions-preventing-pwn-requests/

https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections
...

## Related Issue

Fixes #
<!-- or -->
Relates to #

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Other (security config, docs update, etc)

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
- [ ] [Contributor Guide
Steps](https://github.com/defenseunicorns/pepr/blob/main/CONTRIBUTING.md#submitting-a-pull-request)
followed

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
  • Loading branch information
naveensrinivasan committed Feb 15, 2024
1 parent 9124936 commit f1cfbd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ jobs:
run: npm install --save-dev @commitlint/{config-conventional,cli}

- name: Lint PR title
run: echo "${{ github.event.pull_request.title }}" | npx commitlint
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: echo "$PR_TITLE" | npx commitlint

0 comments on commit f1cfbd5

Please sign in to comment.