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

Add the GitHubSecurityLab/actions-permissions/monitor Action #190

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

mcdonnnj
Copy link
Member

@mcdonnnj mcdonnnj commented Oct 28, 2024

🗣 Description

This pull request adds the GitHubSecurityLab/actions-permissions/monitor Action to the GitHub Actions workflows.

Note

I have added an organization variable called ACTIONS_PERMISSIONS_CONFIG to provide a default configuration across the organization. Repositories can change this as needed for their own purposes. The default configuration as of this pull request is:

{
    "create_artifact": true,
    "debug": false,
    "enabled": true
}

💭 Motivation and context

We have upcoming changes to the default permissions for GITHUB_TOKEN in our organization per the discussion. This Action will help repository maintainers determine the privileges necessary for their GitHub Actions configurations.

Note

Once the GitHubSecurityLab/actions-permissions/monitor Action is deployed and generating artifacts you can use the GitHubSecurityLab/actions-permissions/advisor Action either in your GitHub Actions configuration or directly on the command line (see the directions in the Action's README). This will allow you to compare permissions across multiple successful workflow runs to generate aggregate suggested permissions.

🧪 Testing

Automated tests pass. I verified the Action is running successfully by checking the run logs.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

This Action will provide information about the usage of GITHUB_TOKEN in
the workflow. It should be added to _every_ job in _any_ workflow to
provide information for analysis.
@mcdonnnj mcdonnnj added improvement This issue or pull request will add or improve functionality, maintainability, or ease of use github-actions Pull requests that update GitHub Actions code security This issue or pull request addresses a security issue labels Oct 28, 2024
@mcdonnnj mcdonnnj requested a review from a team October 28, 2024 22:25
@mcdonnnj mcdonnnj self-assigned this Oct 28, 2024
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! 👍

Copy link
Member

@felddy felddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Way to take the initiative. 💪

I'm glad it isn't conflicting with the step-security/harden-runner which also proxies the API. I like this because it is more "in your face". The harden-runner is more subtle. Scroll to bottom of the runner's recommendations for this PR to see:

I thought the harden-runner used to be louder about its recommendations. Maybe this has moved behind the commercial license?

@mcdonnnj mcdonnnj added the kraken 🐙 This pull request is ready to merge during the next Lineage Kraken release label Oct 29, 2024
@mcdonnnj mcdonnnj added this pull request to the merge queue Oct 30, 2024
@mcdonnnj mcdonnnj added the hacktoberfest-accepted Pull request that should count toward Hacktoberfest participation label Oct 30, 2024
Merged via the queue into develop with commit ff221ba Oct 30, 2024
6 checks passed
@mcdonnnj mcdonnnj deleted the improvement/add_actions-permissions-monitor branch October 30, 2024 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github-actions Pull requests that update GitHub Actions code hacktoberfest-accepted Pull request that should count toward Hacktoberfest participation improvement This issue or pull request will add or improve functionality, maintainability, or ease of use kraken 🐙 This pull request is ready to merge during the next Lineage Kraken release security This issue or pull request addresses a security issue
Projects
Development

Successfully merging this pull request may close these issues.

5 participants