Skip to content

feat: add org support#5

Open
joshjohanning wants to merge 10 commits into
advanced-security:mainfrom
joshjohanning:joshjohanning/add-org-to-og
Open

feat: add org support#5
joshjohanning wants to merge 10 commits into
advanced-security:mainfrom
joshjohanning:joshjohanning/add-org-to-og

Conversation

@joshjohanning

Copy link
Copy Markdown

Adding in the ability to generate SBOMs for each repo in a single org.

  • add in org support with new resource input.
    • defaults to current repo
    • can pass in organization name (NOT user)
  • tweak readme to show options
  • when calling organization, filename output uses a wildcard sbom-${owner}-*.json
  • remove sha from being passed
  • adding rate limit plugin to handle cases where rate limited and exit the process if so (otherwise it just hangs there)

Here's an example of this being ran for 3 scenarios

  1. getting for repo - success
  2. getting for org - success
  3. being rate limited b/c didn't pass in token - failed (as expected)

@colindembovsky

Copy link
Copy Markdown
Collaborator

Nice addition @joshjohanning ! I think we should add a test for passing in an org. You'd have to mock the listForOrg request to return a couple mock repos and then you could check that you generated a file per repo.

@colindembovsky

Copy link
Copy Markdown
Collaborator

Gentle ping @joshjohanning

@joshjohanning

Copy link
Copy Markdown
Author

Hmm I'm kind of stuck now @colindembovsky 🆘

Take a look at what I have here: https://github.com/advanced-security/generate-sbom-action/pull/5/files#diff-1b06c53a2167dc2ba60b02160dab80dfa87da1d2f1415f897a05fde005be3559R48-R75

I have a mock set of (3) repos in a file here, but I am not sure how to pass them along to the createRepoList function to simulate/mock that the function returned these 3 repos to then generate sboms for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants