Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: mis-configured OIDC #3629

Open
laurentsimon opened this issue Oct 30, 2023 · 10 comments
Open

Feature: mis-configured OIDC #3629

laurentsimon opened this issue Oct 30, 2023 · 10 comments
Labels
kind/enhancement New feature or request kind/new-check New check for scorecard needs discussion Stale

Comments

@laurentsimon
Copy link
Contributor

See https://medium.com/tinder/identifying-vulnerabilities-in-github-actions-aws-oidc-configurations-8067c400d5b8

@laurentsimon laurentsimon added the kind/enhancement New feature or request label Oct 30, 2023
@spencerschrock
Copy link
Member

Is this something in the source repo, or in AWS/cloud provider? Would we be able to detect it?

@laurentsimon
Copy link
Contributor Author

Great question. It would likely require a cloud credential to scan the settings. I'm not 100% sure if it falls under Scorecard. I'd like Scorecard to be able to do the scan since it's related to SDLC / supply-chain, but we need to discuss further if we're OK (or not) to take as input a new set of (cloud) credentials. Thoughts?

@spencerschrock
Copy link
Member

Great question. It would likely require a cloud credential to scan the settings. I'm not 100% sure if it falls under Scorecard. I'd like Scorecard to be able to do the scan since it's related to SDLC / supply-chain, but we need to discuss further if we're OK (or not) to take as input a new set of (cloud) credentials. Thoughts?

If we can't detect misconfiguration from the repo side, I'm inclined to say it's not in scope of Scorecard.

@laurentsimon
Copy link
Contributor Author

I'm leaning in the other direction because the bug is related to SDLC / CI, which is in scope for Scorecard. In would be sub-optimal to ask users to use a different tool for it. That said, the broader cloud security scanning is out of scope of Scorecard, so I'm only considering this in scope because it's at the "boundary", ie it connects the repo to the cloud CI. Note that Scorecard does not yet support other CI platforms, and I'm not sure what our plans are for it. I think it'd be nice to have but the conversation seems similar. Where does Scorecard stop?

@ossf/scorecard-maintainers what are your thoughts?

@raghavkaul
Copy link
Contributor

I think this is a bit too AWS-y to be in scope for Scorecard. It's not really about GitHub Actions CI or another CI, but about scanning AWS IAM role trust relationships. We'd add a bunch of dependencies on AWS SDK and in general developers would be better suited scanning AWS IAM holistically than running scorecard. There's also all sorts of things like SCPs, permission boundaries, etc. that could come into play with AWS IAM and I'm skeptical that scorecard can do that best.

@laurentsimon
Copy link
Contributor Author

laurentsimon commented Nov 1, 2023

Note that the same problem exists in GCB and Azure.

@laurentsimon
Copy link
Contributor Author

Here's the GCB example , I think that's the blog post https://ermetic.com/blog/gcp/how-attackers-can-exploit-gcps-multicloud-workload-solution/

@raghavkaul
Copy link
Contributor

To clarify, my issue isn't that it's AWS-specific but that it's related to fixing the IAM / ACL settings which are a big lift. It's not directly related to changing CI settings or GitHub config.

Remediation is hard b/c effective IAM rules are the confluence of multiple overlapping rules. What if the IAM role is re-used between other services? We couldn't recommend some easy remediation like updating the role policy because it'd affect other services. What if there's a permission boundary that prevents the vulnerability? Then scorecard would have raised a false positive.

I'm not against Scorecard ever doing this, but the IAM scanning feels daunting and potentially noisy. If Tinder's tool were written in Golang, or there was another tool in Golang, that would made me confident that the cloud detection would be an easy port, but it's written in Python.

@laurentsimon
Copy link
Contributor Author

laurentsimon commented Nov 2, 2023

I think we should not think about implementation details just yet. The first question to answer is whether our users would like Scorecard to be able to detect this, ie does the feature make sense product-wise? It's similar to the Webhook check to some extent, ie it's about how you connect your GitHub repo with your "external" CI components. These are highly-critical bugs (like Webhook and Dangerous Workflows)

Implementation-wise, I have not thought about it yet... I was mostly thinking about the question above. It may be possible to look for usage of https://github.com/google-github-actions/auth in workflows, and then query the settings for that particular service accounts. Again, I may be way off. I think we should answer the product question first. Even if it makes sense product-wise, we don't need to implement the feature if there are blockers implementation-wise.

Copy link

This issue is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the Stale label Jan 19, 2024
@afmarcum afmarcum moved this to Backlog - Checks in Scorecard - NEW Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request kind/new-check New check for scorecard needs discussion Stale
Projects
Status: Backlog - New Checks
Development

No branches or pull requests

3 participants