Skip to content
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

chore: scan latest container image for vulnz on schedule #438

Merged
merged 4 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/binary-scanner.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Binary Scanner

on:
schedule:
- cron: '28 1 * * *'

jobs:
scan:
name: Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Pull image
run: |
docker pull dopplerhq/cli:latest
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'docker.io/dopplerhq/cli:latest'
exit-code: '1'
ignore-unfixed: true
scanners: vuln
8 changes: 6 additions & 2 deletions .github/workflows/vulncheck.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Vulncheck

on: [pull_request, push]
on:
pull_request:
push:
schedule:
- cron: '28 1 * * *'

permissions:
contents: read # to fetch code (actions/checkout)
Expand All @@ -15,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.0
go-version: '1.21'
check-latest: true
- name: Get official govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
Expand Down
1 change: 1 addition & 0 deletions pkg/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ func request(req *http.Request, verifyTLS bool, allowTimeout bool) (*http.Respon
}

func performSSERequest(req *http.Request, verifyTLS bool, handler func([]byte)) (int, http.Header, error) {
// nosemgrep: trailofbits.go.invalid-usage-of-modified-variable.invalid-usage-of-modified-variable
response, requestErr := request(req, verifyTLS, false)
if requestErr != nil {
statusCode := 0
Expand Down
Loading