Skip to content

Commit a697b98

Browse files
author
Ramkumar Chinchani
committed
chore: fix security alerts
https://github.com/project-zot/zot/security/code-scanning/4293 Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
1 parent 96d00cd commit a697b98

7 files changed

Lines changed: 22 additions & 19 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ on:
1010
- published
1111
name: build-test
1212

13-
14-
permissions:
15-
contents: read
16-
packages: write
13+
permissions: read-all
1714

1815
jobs:
1916
build-test:
@@ -355,6 +352,9 @@ jobs:
355352
if: github.event_name == 'release' && github.event.action== 'published'
356353
needs: push-image
357354
name: Update Helm Chart
355+
permissions:
356+
contents: write
357+
packages: write
358358
runs-on: ubuntu-latest
359359
steps:
360360
- uses: actions/checkout@v3

.github/workflows/commit-msg.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
branches:
1111
- main
1212

13+
permissions: read-all
14+
1315
jobs:
1416
check-commit-message-style:
1517
name: Check commit message style

.github/workflows/nightly.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install dependencies
2424
run: |
2525
cd $GITHUB_WORKSPACE
26-
go install github.com/swaggo/swag/cmd/swag
26+
go install github.com/swaggo/swag/cmd/swag@v1.8.12
2727
go mod download
2828
sudo apt-get update
2929
sudo apt-get install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev pkg-config rpm uidmap
@@ -66,7 +66,7 @@ jobs:
6666
- name: Install dependencies
6767
run: |
6868
cd $GITHUB_WORKSPACE
69-
go install github.com/swaggo/swag/cmd/swag
69+
go install github.com/swaggo/swag/cmd/swag@v1.8.12
7070
go mod download
7171
- name: Run sync harness
7272
run: |

.github/workflows/sync-3rdparty-images.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ on:
77
- main
88
workflow_dispatch:
99

10-
permissions:
11-
contents: read
12-
packages: write
10+
permissions: read-all
1311

1412
jobs:
1513
sync-golang:
1614
name: 'golang'
15+
permissions:
16+
contents: read
17+
packages: write
1718
strategy:
1819
matrix:
1920
golang_version:
@@ -34,6 +35,9 @@ jobs:
3435
docker push ghcr.io/${{ github.repository_owner }}/golang:${{ matrix.golang_version }}
3536
sync-trivy:
3637
name: 'trivy-db'
38+
permissions:
39+
contents: read
40+
packages: write
3741
runs-on: ubuntu-latest
3842
steps:
3943
- name: Copy trivy-db using oras cli

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ CRICTL_VERSION := v1.26.1
2525
ACTION_VALIDATOR := $(TOOLSDIR)/bin/action-validator
2626
ACTION_VALIDATOR_VERSION := v0.2.1
2727
ZUI_VERSION := commit-05d5f74
28+
SWAGGER_VERSION := 1.8.12
2829
STACKER := $(TOOLSDIR)/bin/stacker
2930
BATS := $(TOOLSDIR)/bin/bats
3031
TESTDATA := $(TOP_LEVEL)/test/data
@@ -203,7 +204,7 @@ check: ./golangcilint.yaml $(GOLINTER)
203204
rm pkg/extensions/build/.empty
204205

205206
swagger/docs.go:
206-
swag -v || go install github.com/swaggo/swag/cmd/swag@1.6.3
207+
swag -v || go install github.com/swaggo/swag/cmd/swag@$(SWAGGER_VERSION)
207208
swag init -o swagger -g pkg/api/routes.go
208209

209210
.PHONY: swagger

SECURITY.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
## Reporting a Vulnerability
1111

12-
When a vulnerability is found, please *DO NOT* file a public issue.
13-
Instead, send an email to one of the core [maintainers](MAINTAINERS.md) and
14-
await acknowledgement. Normally we expect to resolve the issue in 60 days.
15-
However should there be an exception the team will reach out for next steps.
12+
When a vulnerability is found, please *DO NOT* file a public issue. Instead,
13+
send an email to one of the core [maintainers](MAINTAINERS.md) and await
14+
acknowledgement _OR_ file a [private security issue](https://github.com/project-zot/zot/security/advisories).
15+
Normally we expect to resolve the issue in 60 days. However should there be an exception
16+
the team will reach out for next steps.

golangcilint.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ linters-settings:
4949
mnd:
5050
checks: argument,case,condition,operation,return,assign
5151
ignored-numbers: 10,64
52-
gomoddirectives:
53-
replace-allow-list:
54-
- helm.sh/helm/v3
55-
- github.com/spdx/tools-golang
56-
- github.com/opencontainers/image-spec
5752
issues:
5853
exclude-rules:
5954
- path: pkg/extensions/search/schema.resolvers.go

0 commit comments

Comments
 (0)