Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/accuracy-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: package.json
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: package.json
Expand All @@ -31,6 +33,8 @@ jobs:
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: package.json
Expand All @@ -45,6 +49,8 @@ jobs:
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: package.json
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cleanup-atlas-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
- uses: actions/checkout@v5
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

with:
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: package.json
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/code-health-fork.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
---
name: Code Health (fork)
on:
pull_request_target:
Copy link
Collaborator

Choose a reason for hiding this comment

The 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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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_target trigger which was acting in the context of main branch and never checking out the pull request changes.

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]
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/code-health-long-running.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: package.json
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/code-health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
- main
pull_request:

permissions: {}
permissions:
contents: read

jobs:
run-tests:
Expand All @@ -21,6 +22,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
Expand Down Expand Up @@ -51,6 +54,8 @@ jobs:
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: package.json
Expand All @@ -77,6 +82,8 @@ jobs:
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version-file: package.json
Expand All @@ -99,6 +106,8 @@ jobs:
needs: [run-tests, run-atlas-tests, run-atlas-local-tests]
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: package.json
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
config: ${{ vars.PERMISSIONS_CONFIG }}
- name: Check out code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
persist-credentials: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435
- name: Login to Docker Hub
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ jobs:
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: package.json
Expand Down
Loading