-
Notifications
You must be signed in to change notification settings - Fork 155
chore: reconfigure permission model for Github actions MCP-279 #714
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,17 @@ | ||
| --- | ||
| name: Code Health (fork) | ||
| on: | ||
| pull_request_target: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we are changing this, do we need separated workflows for fork and non fork? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already have separated workflows for both forks (code-health-fork.yml) and non-forks (code-health.yml). The problem earlier was that code-health-fork.yml was never testing the actual changes of the pull request because the workflow was triggered by |
||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: {} | ||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| run-tests: | ||
| name: Run MongoDB tests | ||
| # Code health disabled on forks for now | ||
| # if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.head.repo.full_name != github.repository | ||
| if: github.event.pull_request.user.login == 'dependabot[bot]' | ||
| if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.head.repo.full_name != github.repository | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
|
|
@@ -22,6 +21,8 @@ jobs: | |
| - uses: GitHubSecurityLab/actions-permissions/monitor@v1 | ||
| if: matrix.os == 'ubuntu-latest' | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: docker/setup-docker-action@v4 | ||
| if: matrix.os == 'ubuntu-latest' | ||
| name: Setup Docker Environment | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an alternative, consider switching to v6-beta as that has a mitigation for the persist-credentials issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release is only 3 days. I am thinking of letting it marinate a bit before pulling it in. Will keep on eye on it though. Thanks for the heads up.