parse5 icon indicating copy to clipboard operation
parse5 copied to clipboard

chore(ci): Harden GitHub Actions

Open step-security-bot opened this issue 2 years ago • 5 comments

Summary

This is an automated pull request generated by the Step Security App Bot at the request of @fb55. Please merge the Pull Request to incorporate the requested changes. Please tag @fb55 on your message if you have any questions related to the PR. You can also engage with the Step Security team by tagging @step-security-bot.

Security Fixes

Least Privileged GitHub Actions Token Permissions

The least privilged token permissions were calculate using Secure WorkFlows based on the actions included in the GitHub Workflow files. This is recommended by GitHub as well as The Open Source Security Foundation (OpenSSF).

Pinned Dependencies

A pinned dependency is a dependency that is explicitly set to a specific hashed version instead of a mutable version. Pinned dependencis ensure that development and deployment are done with the same software versions which reduces deployment risks, and enables reproducibility. It can help mitigate compromised dependencies from undermining the security of the project in certain scenarios. The dependencies were pinned using Secure WorkFlows

Feedback

For bug reports, feature requests, and general feedback; please create an issue in step-security/secure-workflows or contact us via our website.

step-security-bot avatar Sep 03 '22 08:09 step-security-bot

Follow-up on #640. Turns out I didn't have to do this manually after all.

fb55 avatar Sep 03 '22 08:09 fb55

Coverage Status

Coverage remained the same at 99.31% when pulling 2ce770439f1336837aed5cb3e9494bcb48103271 on step-security-bot:stepsecurity_remediation_1662194945 into 8e6ef18b94753e880fbd6fe074a5d67c59bc4fe8 on inikulin:master.

coveralls avatar Sep 03 '22 08:09 coveralls

Uhh that pinning is performative? Some tool is going to change them on every release right, and I don’t believe we’re vetting these actions for backdoors then? So it doesn’t do anything except make step-security-bot happy 🤷‍♂️

wooorm avatar Sep 03 '22 14:09 wooorm

The reasoning behind this is that tags can be changed at any moment, to any commit. So right now there is an attack vector where an action is taken over, and a malicious new version receives all tags. By using commit hashes, that becomes virtually impossible.

Not super important for parse5, as not much is happening in the actions, but better safe then sorry 🤷‍♂️

fb55 avatar Sep 03 '22 14:09 fb55

  • to reiterate, this repo uses dependabot to automatically update dependencies, if this scenario you show occurs, dependabot will pull that in:
    • https://github.com/inikulin/parse5/blob/master/.github/dependabot.yml
    • https://github.com/inikulin/parse5/blob/master/.github/workflows/dependabot-automerge.yml
  • there is nothing of value in an action in this repo for someone to target with this scenario

wooorm avatar Sep 03 '22 16:09 wooorm