HNHacker News
TopNewBestAskShowJobs

varunsharma07

683 karma · joined July 3, 2021

Founder of StepSecurity (https://www.stepsecurity.io)
submissionscomments
varunsharma07··on Show HN: Publish from GitHub Actions using multi-factor authentication
OIDC that is a good alternative. This GitHub Action uses OIDC to authenticate the workflow to confirm secrets are only given to the authorized job. The differences between OIDC and MFA for publishing credentials are: 1) More control: each release gets gated by human intervention, requiring MFA to publish. 2) Separation of duties: Just because one has "write" access to the code/ workflow does not automatically permit them to publish. 3) Less management overhead: With MFA, there is no need to set up OIDC trust policies (which need to be configured accurately). This removes the need to manage a separate set of deployment credentials/ policies.
varunsharma07··on Show HN: Publish from GitHub Actions using multi-factor authentication
w.r.t phishing: a maintainer intends to publish a release, will go to their GitHub Actions build log, and will click the link in the build log. So it is not a typical phishing scenario where one gets an email without context and clicks the link. Please let me know if I am missing something. There are also ideas about using a phone app and/or a CLI related to end-to-end encryption https://github.com/step-security/wait-for-secrets/issues/56.
varunsharma07··on Show HN: Publish from GitHub Actions using multi-factor authentication
Yes. The workflow blocks and prints a URL every 10 seconds. The developer can click on the link and enter secrets in the browser. The workflow then continues, and secrets can be used in future steps.
varunsharma07··on Show HN: Publish from GitHub Actions using multi-factor authentication
To release the wait-for-secrets Action, I run the workflow using a PAT sent in via the browser. In that sense, it is similar to what you mentioned. I create the PAT during the release process and delete it after the release is done.

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.

varunsharma07··on Show HN: Publish from GitHub Actions using multi-factor authentication
Thanks, Gaurav :)!
varunsharma07··on Show HN: Publish from GitHub Actions using multi-factor authentication
Added an issue to track this: https://github.com/step-security/wait-for-secrets/issues/56

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.

varunsharma07··on Do you maintain a GitHub Action? Contribute to the SecureWorkflows project
The problem we are trying to solve is to automatically calculate what the minimum GITHUB_TOKEN permissions should be for a given workflow.

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.

varunsharma07··on Sigstore - A new standard for signing, verifying and protecting software
If there was a way to know the behavior of NotPetya and realize that it has code to do things that M.E.Doc (the tax preparation program that was backdoored) was not supposed to do, that could have been used as a way to reject its installation. We are far away from being able to do such analysis at scale, but my point is that it is ultimately the behavior of software that makes it malicious or not.
varunsharma07··on Sigstore - A new standard for signing, verifying and protecting software
I agree. There are projects such as https://github.com/ossf/package-analysis and https://github.com/step-security/harden-runner that do behavior analysis. Disclosure: I’m maintainer of the second one.
varunsharma07··on Large-scale NPM attack targets Azure developers with malicious packages
Checkout this GitHub Actions workflow where the outbound calls made by some of these malicious packages are detected. Harden-Runner GitHub Action detects and blocks outbound calls for this exact reason - to identity malicious packages. https://github.com/varunsh-coder/supply-chain-goat/actions/r...
varunsharma07··on Show HN: Test Your Defenses with a Malware-Simulator Package
A new tutorial has been added to https://github.com/step-security/supply-chain-goat/blob/main... to perform behavior analysis of dependencies.

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.

varunsharma07··on Show HN: npm install actual-malware
Here is one such tool for GitHub Actions: https://github.com/step-security/harden-runner. It would have detected and blocked the call to pastebin.com in this scenario. I am the maintainer of this tool.
varunsharma07··on Show HN: harden-runner: GitHub Action to prevent software supply chain attacks
Thanks for the feedback!

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.

varunsharma07··on Show HN: harden-runner: GitHub Action to prevent software supply chain attacks
Most of the times compromised dependencies and build tools make outbound requests. This GitHub Action monitors the GitHub-hosted runner for outbound requests and allows setting a policy to block based on allowed endpoints.

More details at: Introducing Harden-Runner: GitHub Action to prevent supply chain attacks: https://blog.stepsecurity.io/introducing-harden-runner-githu...

varunsharma07··on How to optimize the security, size and build speed of Docker images
Thanks for the mention for harden-runner GitHub Action! sharing the link: https://github.com/step-security/harden-runner
← PreviousPage 3 of 3