defenseunicorns / pkg

Common Go modules maintained by Defense Unicorns
Apache License 2.0
5 stars 4 forks source link

fix: use env var for PR title in commitlint workflow to prevent untrusted script injection #60

Closed lucasrod16 closed 5 months ago

lucasrod16 commented 5 months ago

Description

Our OSSF scorecard workflow flagged this as a Critical security risk. Unsure of whether there is a real attack vector in our specific case. Using an environment variable to capture untrusted input in workflows is a documented security hardening best practice by GitHub as well.

This should also boost our OSSF scorecard score since we have a 0 on this check.

image

Dangerous-Workflow check:

Risk of script injections:

Example script injection attack:

Recommended fix that this PR implements: