0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00

chore: fix security alerts (#1493)

https://github.com/project-zot/zot/security/code-scanning/4293

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
Ramkumar Chinchani 2023-06-01 16:53:50 -07:00 committed by GitHub
parent 96d00cd0ef
commit d9e5f33e7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 19 deletions

View file

@ -10,10 +10,7 @@ on:
- published - published
name: build-test name: build-test
permissions: read-all
permissions:
contents: read
packages: write
jobs: jobs:
build-test: build-test:
@ -355,6 +352,9 @@ jobs:
if: github.event_name == 'release' && github.event.action== 'published' if: github.event_name == 'release' && github.event.action== 'published'
needs: push-image needs: push-image
name: Update Helm Chart name: Update Helm Chart
permissions:
contents: write
packages: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

View file

@ -10,6 +10,8 @@ on:
branches: branches:
- main - main
permissions: read-all
jobs: jobs:
check-commit-message-style: check-commit-message-style:
name: Check commit message style name: Check commit message style

View file

@ -23,7 +23,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
cd $GITHUB_WORKSPACE cd $GITHUB_WORKSPACE
go install github.com/swaggo/swag/cmd/swag go install github.com/swaggo/swag/cmd/swag@v1.8.12
go mod download go mod download
sudo apt-get update sudo apt-get update
sudo apt-get install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev pkg-config rpm uidmap sudo apt-get install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev pkg-config rpm uidmap
@ -66,7 +66,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
cd $GITHUB_WORKSPACE cd $GITHUB_WORKSPACE
go install github.com/swaggo/swag/cmd/swag go install github.com/swaggo/swag/cmd/swag@v1.8.12
go mod download go mod download
- name: Run sync harness - name: Run sync harness
run: | run: |

View file

@ -7,13 +7,14 @@ on:
- main - main
workflow_dispatch: workflow_dispatch:
permissions: permissions: read-all
contents: read
packages: write
jobs: jobs:
sync-golang: sync-golang:
name: 'golang' name: 'golang'
permissions:
contents: read
packages: write
strategy: strategy:
matrix: matrix:
golang_version: golang_version:
@ -34,6 +35,9 @@ jobs:
docker push ghcr.io/${{ github.repository_owner }}/golang:${{ matrix.golang_version }} docker push ghcr.io/${{ github.repository_owner }}/golang:${{ matrix.golang_version }}
sync-trivy: sync-trivy:
name: 'trivy-db' name: 'trivy-db'
permissions:
contents: read
packages: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Copy trivy-db using oras cli - name: Copy trivy-db using oras cli

View file

@ -25,6 +25,7 @@ CRICTL_VERSION := v1.26.1
ACTION_VALIDATOR := $(TOOLSDIR)/bin/action-validator ACTION_VALIDATOR := $(TOOLSDIR)/bin/action-validator
ACTION_VALIDATOR_VERSION := v0.2.1 ACTION_VALIDATOR_VERSION := v0.2.1
ZUI_VERSION := commit-05d5f74 ZUI_VERSION := commit-05d5f74
SWAGGER_VERSION := 1.8.12
STACKER := $(TOOLSDIR)/bin/stacker STACKER := $(TOOLSDIR)/bin/stacker
BATS := $(TOOLSDIR)/bin/bats BATS := $(TOOLSDIR)/bin/bats
TESTDATA := $(TOP_LEVEL)/test/data TESTDATA := $(TOP_LEVEL)/test/data
@ -203,7 +204,7 @@ check: ./golangcilint.yaml $(GOLINTER)
rm pkg/extensions/build/.empty rm pkg/extensions/build/.empty
swagger/docs.go: swagger/docs.go:
swag -v || go install github.com/swaggo/swag/cmd/swag@1.6.3 swag -v || go install github.com/swaggo/swag/cmd/swag@$(SWAGGER_VERSION)
swag init -o swagger -g pkg/api/routes.go swag init -o swagger -g pkg/api/routes.go
.PHONY: swagger .PHONY: swagger

View file

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

View file

@ -49,11 +49,6 @@ linters-settings:
mnd: mnd:
checks: argument,case,condition,operation,return,assign checks: argument,case,condition,operation,return,assign
ignored-numbers: 10,64 ignored-numbers: 10,64
gomoddirectives:
replace-allow-list:
- helm.sh/helm/v3
- github.com/spdx/tools-golang
- github.com/opencontainers/image-spec
issues: issues:
exclude-rules: exclude-rules:
- path: pkg/extensions/search/schema.resolvers.go - path: pkg/extensions/search/schema.resolvers.go