-
Notifications
You must be signed in to change notification settings - Fork 8
chore(security): pin all GitHub Actions to commit SHAs #1013
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
base: main
Are you sure you want to change the base?
Changes from all commits
452103f
9be7dba
fe13450
0451a3f
930b614
b00b205
9f684c9
94497b3
2d37b46
9b2d42d
e15e7a4
5f17af3
43a2ba3
60514f5
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 |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| blank_issues_enabled: true | ||
| contact_links: | ||
| - name: Phenotype org | ||
| url: https://github.com/KooshaPari | ||
| about: Other Phenotype-ecosystem repos and discussions |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,19 @@ | ||
| name: Alert sync issues | ||
| on: | ||
| push: | ||
| branches: [main, master, develop] | ||
| pull_request: | ||
| branches: [main, master, develop] | ||
| schedule: | ||
| - cron: '17 * * * *' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write | ||
|
|
||
| jobs: | ||
| sync: | ||
| uses: KooshaPari/phenoShared/.github/workflows/alert-sync-issues.yml@main | ||
| uses: KooshaPari/phenoShared/.github/workflows/alert-sync-issues.yml@438e2e71e448c9f1f47f184d3ca4acbb28928677 | ||
| with: | ||
| auto-label: auto-alert-sync | ||
| min_severity: high |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,11 @@ | ||
| name: codeql | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, master, develop] | ||
| pull_request: | ||
| branches: [main, master, develop] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| actions: read | ||
| contents: read | ||
|
|
@@ -12,28 +15,31 @@ jobs: | |
| analyze: | ||
| name: Analyze (Go) | ||
| if: ${{ !startsWith(github.head_ref, 'ci/fix-migrated-router-20260225060000-feature_ampcode-alias') }} | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-24.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| language: [go] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5@11bd71901bbe5b1630ceea73d27597364c9af683 # v4- name: Initialize CodeQL | ||
| uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4with: | ||
| actions/checkout@900f2210b1d28bbbd0bd22d17926b9e224e8f231 # v4 | ||
| name: Initialize CodeQL | ||
| github/codeql-action/init@115001ba8d0198846992657731666b08686c8ded # v4 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| config-file: .github/codeql/codeql-config.yml | ||
| - name: Set up Go | ||
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5with: | ||
| actions/setup-go@78961f6f84d799cd858575bb931c3e51d3b13290 # v5 | ||
| with: | ||
| go-version-file: go.mod | ||
| cache: true | ||
| - name: Build | ||
| run: go build ./... | ||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4analyze-skip-for-migrated-router-fix: | ||
| github/codeql-action/analyze@115001ba8d0198846992657731666b08686c8ded # v4analyze-skip-for-migrated-router-fix: | ||
| name: Analyze (Go) | ||
| if: ${{ startsWith(github.head_ref, 'ci/fix-migrated-router-20260225060000-feature_ampcode-alias') }} | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-24.04 | ||
|
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. Second CodeQL job swallowed into comment, disabling analysisHigh Severity The second job name Reviewed by Cursor Bugbot for commit 60514f5. Configure here. |
||
| steps: | ||
| - name: Skip CodeQL build for migrated router compatibility branch | ||
| run: echo "Skipping CodeQL build for migrated router compatibility branch." | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,11 @@ | ||
| name: coderabbit-rate-limit-retry | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, master, develop] | ||
| pull_request: | ||
| branches: [main, master, develop] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| checks: write | ||
| contents: read | ||
|
|
@@ -12,10 +15,11 @@ permissions: | |
| jobs: | ||
| retrigger: | ||
| name: retrigger-coderabbit-on-rate-limit | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Re-request CodeRabbit when backlog is high and check is stale | ||
| uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7with: | ||
| actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v7 | ||
| with: | ||
| script: | | ||
| const owner = context.repo.owner; | ||
| const repo = context.repo.repo; | ||
|
|
@@ -166,7 +170,7 @@ jobs: | |
| status: "completed", | ||
| conclusion: pass ? "success" : "failure", | ||
| output: { | ||
| title: pass ? "CodeRabbit gate passed" : "CodeRabbit gate blocked", | ||
| title: "pass ? "CodeRabbit gate passed" : "CodeRabbit gate blocked"," | ||
|
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. Corrupted JavaScript ternary expression in gate titleHigh Severity The JavaScript ternary expression for the check gate title was incorrectly wrapped in double quotes, turning Reviewed by Cursor Bugbot for commit 60514f5. Configure here. |
||
| summary, | ||
| }, | ||
| }); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,11 @@ | ||
| name: docker-image | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, master, develop] | ||
| pull_request: | ||
| branches: [main, master, develop] | ||
|
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. Docker push and release workflows now trigger on every PRHigh Severity The Additional Locations (1)Reviewed by Cursor Bugbot for commit 60514f5. Configure here. |
||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| APP_NAME: CLIProxyAPI | ||
| DOCKERHUB_REPO: ${{ secrets.DOCKERHUB_USERNAME }}/cli-proxy-api-plus | ||
|
|
@@ -12,16 +15,19 @@ permissions: | |
|
|
||
| jobs: | ||
| docker_amd64: | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5@11bd71901bbe5b1630ceea73d27597364c9af683 # v4- name: Refresh models catalog | ||
| actions/checkout@900f2210b1d28bbbd0bd22d17926b9e224e8f231 # v4 | ||
| - name: Refresh models catalog | ||
| run: | | ||
| git fetch --depth 1 https://github.com/router-for-me/models.git main | ||
| git show FETCH_HEAD:models.json > internal/registry/models/models.json | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3- name: Login to DockerHub | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3with: | ||
| docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | ||
| - name: Login to DockerHub | ||
| docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 | ||
| with: | ||
| username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
| - name: Generate Build Metadata | ||
|
|
@@ -30,7 +36,8 @@ jobs: | |
| echo COMMIT=`git rev-parse --short HEAD` >> $GITHUB_ENV | ||
| echo BUILD_DATE=`date -u +%Y-%m-%dT%H:%M:%SZ` >> $GITHUB_ENV | ||
| - name: Build and push (amd64) | ||
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6with: | ||
| docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | ||
| with: | ||
| context: . | ||
| platforms: linux/amd64 | ||
| push: true | ||
|
|
@@ -46,13 +53,16 @@ jobs: | |
| runs-on: ubuntu-24.04-arm | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5@11bd71901bbe5b1630ceea73d27597364c9af683 # v4- name: Refresh models catalog | ||
| actions/checkout@900f2210b1d28bbbd0bd22d17926b9e224e8f231 # v4 | ||
| - name: Refresh models catalog | ||
| run: | | ||
| git fetch --depth 1 https://github.com/router-for-me/models.git main | ||
| git show FETCH_HEAD:models.json > internal/registry/models/models.json | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3- name: Login to DockerHub | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3with: | ||
| docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | ||
| - name: Login to DockerHub | ||
| docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 | ||
| with: | ||
| username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
| - name: Generate Build Metadata | ||
|
|
@@ -61,7 +71,8 @@ jobs: | |
| echo COMMIT=`git rev-parse --short HEAD` >> $GITHUB_ENV | ||
| echo BUILD_DATE=`date -u +%Y-%m-%dT%H:%M:%SZ` >> $GITHUB_ENV | ||
| - name: Build and push (arm64) | ||
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6with: | ||
| docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | ||
| with: | ||
| context: . | ||
| platforms: linux/arm64 | ||
| push: true | ||
|
|
@@ -74,15 +85,18 @@ jobs: | |
| ${{ env.DOCKERHUB_REPO }}:${{ env.VERSION }}-arm64 | ||
|
|
||
| docker_manifest: | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-24.04 | ||
| needs: | ||
| - docker_amd64 | ||
| - docker_arm64 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5@11bd71901bbe5b1630ceea73d27597364c9af683 # v4- name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3- name: Login to DockerHub | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3with: | ||
| actions/checkout@900f2210b1d28bbbd0bd22d17926b9e224e8f231 # v4 | ||
| - name: Set up Docker Buildx | ||
| docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | ||
| - name: Login to DockerHub | ||
| docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3 | ||
| with: | ||
| username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
| - name: Generate Build Metadata | ||
|
|
@@ -102,7 +116,7 @@ jobs: | |
| "${DOCKERHUB_REPO}:${VERSION}-arm64" | ||
| - name: Cleanup temporary tags | ||
| continue-on-error: true | ||
| env: | ||
| - env: | ||
|
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. Docker cleanup step split loses
|
||
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
| run: | | ||
|
|
||


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.
Missing
uses:keyword breaks all workflow action stepsHigh Severity
Every third-party action reference across all 27 workflow files is missing the required
uses:keyword. For example,- actions/checkout@900f2210...appears instead of- uses: actions/checkout@900f2210.... GitHub Actions requires theuses:key to identify an action step; without it, the action reference becomes an unrecognized YAML mapping key, making the step invalid. This systematically breaks every workflow in the repository.Additional Locations (2)
.github/workflows/docker-image.yml#L20-L21.github/workflows/pr-test-build.yml#L18-L19Reviewed by Cursor Bugbot for commit 60514f5. Configure here.