Skip to content

Commit ae02c41

Browse files
committed
Merge branch 'main' of github.com:DmitriyLewen/trivy into deps/go-containerregistry
# Conflicts: # go.mod # go.sum
2 parents 87763e0 + 8f049df commit ae02c41

170 files changed

Lines changed: 2335 additions & 7267 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/workflows/backport.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
with:
4343
client-id: ${{ secrets.REPO_TRIVY_WRITE_GH_APP_CLIENT_ID }}
4444
private-key: ${{ secrets.REPO_TRIVY_WRITE_GH_APP_PRIVATE_KEY }}
45+
permission-contents: write
46+
permission-pull-requests: write
4547

4648
- name: Checkout repository
4749
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/mkdocs-latest.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
private-key: ${{ secrets.TRIVY_WORKFLOW_TRIGGER_APP_PRIVATE_KEY }}
5656
owner: ${{ github.repository_owner }}
5757
repositories: trivy-www
58+
permission-actions: write
5859
- name: Trigger build-docs workflow in trivy-www
5960
env:
6061
GH_TOKEN: ${{ steps.app-token.outputs.token }}

.github/workflows/publish-chart.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
private-key: ${{ secrets.TRIVY_WORKFLOW_TRIGGER_APP_PRIVATE_KEY }}
7272
owner: ${{ github.repository_owner }}
7373
repositories: helm-charts
74+
permission-actions: write
7475
- name: Trigger publish-chart workflow in helm-charts
7576
env:
7677
GH_TOKEN: ${{ steps.app-token.outputs.token }}

.github/workflows/release-please.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
with:
2626
client-id: ${{ secrets.REPO_TRIVY_WRITE_GH_APP_CLIENT_ID }}
2727
private-key: ${{ secrets.REPO_TRIVY_WRITE_GH_APP_PRIVATE_KEY }}
28+
permission-contents: write
29+
permission-pull-requests: write
2830

2931
- name: Release Please
3032
id: release
@@ -45,6 +47,8 @@ jobs:
4547
with:
4648
client-id: ${{ secrets.REPO_TRIVY_WRITE_GH_APP_CLIENT_ID }}
4749
private-key: ${{ secrets.REPO_TRIVY_WRITE_GH_APP_PRIVATE_KEY }}
50+
permission-contents: write
51+
permission-pull-requests: write
4852

4953
- name: Install Release Please CLI
5054
run: npm install release-please -g
@@ -84,6 +88,7 @@ jobs:
8488
with:
8589
client-id: ${{ secrets.REPO_TRIVY_WRITE_GH_APP_CLIENT_ID }}
8690
private-key: ${{ secrets.REPO_TRIVY_WRITE_GH_APP_PRIVATE_KEY }}
91+
permission-contents: write
8792

8893
- name: Tag release
8994
if: ${{ steps.extract_info.outputs.version }}

.github/workflows/release.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
private-key: ${{ secrets.TRIVY_WORKFLOW_TRIGGER_APP_PRIVATE_KEY }}
3535
owner: ${{ github.repository_owner }}
3636
repositories: trivy-repo
37+
permission-actions: write
3738
- name: Trigger deploy-packages workflow in trivy-repo
3839
env:
3940
GH_TOKEN: ${{ steps.app-token.outputs.token }}
@@ -56,6 +57,8 @@ jobs:
5657
with:
5758
client-id: ${{ secrets.REPO_TRIVY_WRITE_GH_APP_CLIENT_ID }}
5859
private-key: ${{ secrets.REPO_TRIVY_WRITE_GH_APP_PRIVATE_KEY }}
60+
permission-contents: write
61+
permission-pull-requests: write
5962

6063
- name: Checkout
6164
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -99,6 +102,7 @@ jobs:
99102
trivy-downloads
100103
trivy-chocolatey
101104
trivy-action
105+
permission-actions: write
102106
- name: Trigger update_version workflow in trivy-telemetry
103107
if: always()
104108
env:

.golangci.yaml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,19 @@ linters:
4646
gocyclo:
4747
# Next highest complexity candidate: ApplyLayers in pkg/fanal/applier/docker.go (score: 28)
4848
min-complexity: 20
49-
gomodguard:
49+
gomodguard_v2:
5050
blocked:
51-
modules:
52-
- github.com/hashicorp/go-version:
53-
recommendations:
54-
- github.com/aquasecurity/go-version
55-
reason: "`aquasecurity/go-version` is designed for our use-cases"
56-
- github.com/Masterminds/semver:
57-
recommendations:
58-
- github.com/aquasecurity/go-version
59-
reason: "`aquasecurity/go-version` is designed for our use-cases"
60-
- github.com/liamg/memoryfs:
61-
recommendations:
62-
- github.com/aquasecurity/trivy/pkg/mapfs
51+
- module: github.com/hashicorp/go-version
52+
recommendations:
53+
- github.com/aquasecurity/go-version
54+
reason: "`aquasecurity/go-version` is designed for our use-cases"
55+
- module: github.com/Masterminds/semver
56+
recommendations:
57+
- github.com/aquasecurity/go-version
58+
reason: "`aquasecurity/go-version` is designed for our use-cases"
59+
- module: github.com/liamg/memoryfs
60+
recommendations:
61+
- github.com/aquasecurity/trivy/pkg/mapfs
6362
gosec:
6463
excludes:
6564
- G101
@@ -151,7 +150,7 @@ linters:
151150
- depguard
152151
- gocritic
153152
- gocyclo
154-
- gomodguard
153+
- gomodguard_v2
155154
- gosec
156155
- govet
157156
- ineffassign

0 commit comments

Comments
 (0)