Skip to content

Commit 1d383b6

Browse files
committed
Merge branch 'main' of github.com:DmitriyLewen/trivy into fix/release-please-multiline-commit
2 parents 05700b6 + 8f049df commit 1d383b6

340 files changed

Lines changed: 7800 additions & 8908 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Global
2-
* @knqyf263
2+
* @knqyf263 @DmitriyLewen
33

44
# SBOM/Vulnerability scanning
55
pkg/dependency/ @knqyf263 @DmitriyLewen
@@ -8,15 +8,15 @@ pkg/sbom/ @knqyf263 @DmitriyLewen
88
pkg/scanner/ @knqyf263 @DmitriyLewen
99

1010
# Misconfiguration scanning
11-
docs/guide/scanner/misconfiguration/ @simar7 @nikpivkin
12-
docs/guide/target/aws.md @simar7 @nikpivkin
13-
pkg/fanal/analyzer/config/ @simar7 @nikpivkin
14-
pkg/config/aws/ @simar7 @nikpivkin
15-
pkg/iac/ @simar7 @nikpivkin
11+
docs/guide/scanner/misconfiguration/ @nikpivkin
12+
docs/guide/target/aws.md @nikpivkin
13+
pkg/fanal/analyzer/config/ @nikpivkin
14+
pkg/config/aws/ @nikpivkin
15+
pkg/iac/ @nikpivkin
1616

1717
# Helm chart
18-
helm/trivy/ @afdesk @simar7
18+
helm/trivy/ @afdesk
1919

2020
# Kubernetes scanning
21-
pkg/k8s/ @afdesk @simar7
22-
docs/guide/target/kubernetes.md @afdesk @simar7
21+
pkg/k8s/ @afdesk
22+
docs/guide/target/kubernetes.md @afdesk

.github/actions/setup-go/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ runs:
2626
echo "version=$major_minor" >> "$GITHUB_OUTPUT"
2727
2828
- name: Set up Go
29-
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
29+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
3030
with:
3131
go-version: ${{ steps.go-version.outputs.version }}
3232
cache: false

.github/actions/trivy-triage/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ runs:
88
using: "composite"
99
steps:
1010
- name: Conditionally label discussions based on category and content
11-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
11+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1212
env:
1313
GH_TOKEN: ${{ github.token }}
1414
DISCUSSION_NUM: ${{ inputs.discussion_num }}

.github/workflows/auto-close-issue.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-2404-2core
1010
steps:
1111
- name: Close issue if user does not have write or admin permissions
12-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
12+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1313
with:
1414
script: |
1515
// Get the issue creator's username

.github/workflows/auto-ready-for-review.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
3535
- name: Check PR and all workflows status
3636
if: steps.pr-context.outputs.skip != 'true'
37-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
37+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
3838
env:
3939
PR_NUMBER: ${{ steps.pr-context.outputs.number }}
4040
with:

.github/workflows/backport.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,23 @@ jobs:
3434
startsWith(github.event.comment.body, '@aqua-bot backport release/')
3535
runs-on: ubuntu-2404-2core
3636
steps:
37+
# GITHUB_TOKEN cannot trigger workflows on PRs it creates, so the backport
38+
# PR would not run CI — generate a GitHub App installation token instead.
39+
- name: Generate token
40+
id: app-token
41+
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
42+
with:
43+
client-id: ${{ secrets.REPO_TRIVY_WRITE_GH_APP_CLIENT_ID }}
44+
private-key: ${{ secrets.REPO_TRIVY_WRITE_GH_APP_PRIVATE_KEY }}
45+
permission-contents: write
46+
permission-pull-requests: write
47+
3748
- name: Checkout repository
3849
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3950
with:
4051
fetch-depth: 0
4152
persist-credentials: true # backport.sh runs git push
53+
token: ${{ steps.app-token.outputs.token }}
4254

4355
- name: Extract branch name
4456
env:
@@ -58,8 +70,6 @@ jobs:
5870
5971
- name: Run backport script
6072
env:
61-
# Use TRIVY_REPO_TOKEN instead of GITHUB_TOKEN
62-
# This allows the created PR to trigger tests and other workflows
63-
GITHUB_TOKEN: ${{ secrets.TRIVY_REPO_TOKEN }}
73+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
6474
ISSUE_NUMBER: ${{ github.event.issue.number }}
6575
run: ./misc/backport/backport.sh "$BRANCH_NAME" "$ISSUE_NUMBER"

.github/workflows/cache-test-assets.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
3535
3636
- name: Restore and save test images cache
37-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
37+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
3838
with:
3939
path: integration/testdata/fixtures/images
4040
key: cache-test-images-${{ steps.image-digest.outputs.digest }}
@@ -66,7 +66,7 @@ jobs:
6666
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
6767
6868
- name: Restore and save test VM images cache
69-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
69+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
7070
with:
7171
path: integration/testdata/fixtures/vm-images
7272
key: cache-test-vm-images-${{ steps.image-digest.outputs.digest }}
@@ -89,7 +89,7 @@ jobs:
8989
- name: Run golangci-lint for caching
9090
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
9191
with:
92-
version: v2.10
92+
version: v2.12
9393
args: --verbose
9494
env:
9595
GOEXPERIMENT: jsonv2

.github/workflows/canary.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
ECR_ACCESS_KEY_ID: ${{ secrets.ECR_ACCESS_KEY_ID }}
2424
ECR_SECRET_ACCESS_KEY: ${{ secrets.ECR_SECRET_ACCESS_KEY }}
2525
GPG_KEY: ${{ secrets.GPG_KEY }}
26-
TRIVY_REPO_TOKEN: ${{ secrets.TRIVY_REPO_TOKEN }}
2726
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
2827

2928
upload-binaries:
@@ -34,35 +33,35 @@ jobs:
3433
actions: write # Required to delete caches
3534
steps:
3635
- name: Restore Trivy binaries from cache
37-
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
36+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
3837
with:
3938
path: dist/
4039
key: ${{ runner.os }}-bins-${{ github.workflow }}-${{ github.sha }}
4140

4241
# Upload artifacts
4342
- name: Upload artifacts (trivy_Linux-64bit)
44-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
43+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
4544
with:
4645
name: trivy_Linux-64bit
4746
path: dist/trivy_*_Linux-64bit.tar.gz
4847
if-no-files-found: error
4948

5049
- name: Upload artifacts (trivy_Linux-ARM64)
51-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
50+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
5251
with:
5352
name: trivy_Linux-ARM64
5453
path: dist/trivy_*_Linux-ARM64.tar.gz
5554
if-no-files-found: error
5655

5756
- name: Upload artifacts (trivy_macOS-64bit)
58-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
57+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
5958
with:
6059
name: trivy_macOS-64bit
6160
path: dist/trivy_*_macOS-64bit.tar.gz
6261
if-no-files-found: error
6362

6463
- name: Upload artifacts (trivy_macOS-ARM64)
65-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
64+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
6665
with:
6766
name: trivy_macOS-ARM64
6867
path: dist/trivy_*_macOS-ARM64.tar.gz

.github/workflows/mkdocs-latest.yaml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,24 @@ jobs:
4141
run: mike deploy --push --update-aliases "$DOCS_VERSION" latest
4242

4343
# This workflow is used to trigger the trivy-www deployment
44-
trigger-trivy-www-deploy:
44+
trigger-trivy-www-deploy:
4545
needs: deploy
4646
runs-on: ubuntu-2404-2core
4747
steps:
48-
- name: Trigger update_version workflow in trivy-telemetry
48+
# GITHUB_TOKEN is scoped to the current repository and cannot trigger
49+
# workflows in other repos — generate a GitHub App installation token instead.
50+
- name: Generate token
51+
id: app-token
52+
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
53+
with:
54+
client-id: ${{ secrets.ACTIONS_MULTI_WRITE_GH_APP_CLIENT_ID }}
55+
private-key: ${{ secrets.TRIVY_WORKFLOW_TRIGGER_APP_PRIVATE_KEY }}
56+
owner: ${{ github.repository_owner }}
57+
repositories: trivy-www
58+
permission-actions: write
59+
- name: Trigger build-docs workflow in trivy-www
4960
env:
50-
# Use TRIVY_WORKFLOW_TRIGGER_TOKEN instead of GITHUB_TOKEN
51-
# This allows triggering workflows in other repositories
52-
GH_TOKEN: ${{ secrets.TRIVY_WORKFLOW_TRIGGER_TOKEN }}
61+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
5362
run: |
5463
gh workflow run build-docs.yml \
5564
--repo "$GITHUB_REPOSITORY_OWNER/trivy-www" \

.github/workflows/publish-chart.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fetch-depth: 0
2828
persist-credentials: false
2929
- name: Install Helm
30-
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
30+
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
3131
with:
3232
version: v3.14.4
3333
- name: Set up python
@@ -61,9 +61,20 @@ jobs:
6161
- test-chart
6262
runs-on: ubuntu-2404-2core
6363
steps:
64+
# GITHUB_TOKEN is scoped to the current repository and cannot trigger
65+
# workflows in other repos — generate a GitHub App installation token instead.
66+
- name: Generate token
67+
id: app-token
68+
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
69+
with:
70+
client-id: ${{ secrets.ACTIONS_MULTI_WRITE_GH_APP_CLIENT_ID }}
71+
private-key: ${{ secrets.TRIVY_WORKFLOW_TRIGGER_APP_PRIVATE_KEY }}
72+
owner: ${{ github.repository_owner }}
73+
repositories: helm-charts
74+
permission-actions: write
6475
- name: Trigger publish-chart workflow in helm-charts
6576
env:
66-
GH_TOKEN: ${{ secrets.TRIVY_WORKFLOW_TRIGGER_TOKEN }}
77+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
6778
REF: ${{ github.sha }}
6879
run: |
6980
gh workflow run publish-chart.yaml \

0 commit comments

Comments
 (0)