683 karma · joined July 3, 2021
I have added an issue to track your idea: https://github.com/step-security/wait-for-secrets/issues/57. It would be interesting to run as the current user using OAuth, but it will need more thinking.
The backend API is open-source, and the secrets are cleared immediately after use from the data store, but I agree this is a good idea.
We are solving this problem by building a knowledge base of permissions needed by each GitHub Action.
If you own a GitHub Action, contribute to the SecureWorkflows project by adding a YAML file describing the permissions your Action needs.
For this a package was needed to simulate behavior of past hijacked packages. https://www.npmjs.com/package/@step-security/malware-simulat... makes an outbound call in a preinstall step.
You can think of the @step-security/malware-simulator package being like the EICAR file, which is used as a test file for anti-virus software.
Can be used to test if you can detect packages that make outbound calls, which is a common theme for hijacked packages.
w.r.t Bypass idea 1: If the compromised step is not supposed to call github.com, this will immediately get detected. This is the advantage of having outbound traffic correlated per step. Most steps do not need to call github.com. In the future, the plan is to also have application level policy, e.g. only allow 'GET https://github.com/owner/repo'.
w.r.t Bypass idea 2: in the future, the plan is to have a policy to disable sudo. Once that is done, user code will not be able to mess with the agent.
More details at: Introducing Harden-Runner: GitHub Action to prevent supply chain attacks: https://blog.stepsecurity.io/introducing-harden-runner-githu...