- Ensure you are using the Endor Labs GitHub Action in your GitHub workflow.
- Edit your GitHub Action workflow to add permission settings for the GitHub
id-tokenandcontents. - Create an authorization policy for
GitHub Action OIDC. - Test that you can successfully scan a project using
GitHub Action OIDC.
Add a GitHub Action OIDC authorization policy
To ensure that the GitHub Action OIDC identity can successfully login to Endor Labs, create an authorization policy in Endor Labs. To create an authorization policy:- Select Settings > Access Control from the left sidebar.
- Select Auth Policy.
- Click on Add Auth Policy.
- Select GitHub Action OIDC as your identity provider.
- Select the permission for the GitHub Action. This permission should be
Code Scanner. - For the claim use the key
userand put in a matching value that maps to the organization of your GitHub repository.
Configure your GitHub Action workflow
To configure your GitHub Action workflow with GitHub Action OIDC you can use the following example as a baseline. The important items in this workflow are:- The Usage of the Endor Labs GitHub Action.
- Setting Job level permissions to allow writing to the GitHub
id-tokenand reading repositorycontents.