-
Notifications
You must be signed in to change notification settings - Fork 323
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
[NET-2420] security: re-enable security scan release block #3628
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
18ab5b1
security: upgrade helm/v3 to 3.13.3
zalimeni 3449458
chore: upgrade k8s dependencies to match controller-runtime
zalimeni 22343e3
security: upgrade containerd to latest
zalimeni 0ffcb83
security: upgrade docker/docker to latest
zalimeni ae2348a
security: upgrade docker/distribution to latest
zalimeni c950489
security: upgrade filepath-securejoin to latest patch
zalimeni 57a10bc
chore: upgrade oras-go to fix docker incompatibility
zalimeni 8e9f1e6
Add changelog
zalimeni 8fda3bb
security: re-enable security scan release block
zalimeni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
```release-note:security | ||
Upgrade `helm/v3` to 3.11.3. This resolves the following security vulnerabilities: | ||
[CVE-2023-25165](https://osv.dev/vulnerability/CVE-2023-25165) | ||
[CVE-2022-23524](https://osv.dev/vulnerability/CVE-2022-23524) | ||
[CVE-2022-23526](https://osv.dev/vulnerability/CVE-2022-23526) | ||
[CVE-2022-23525](https://osv.dev/vulnerability/CVE-2022-23525) | ||
``` | ||
```release-note:security | ||
security: upgrade containerd to 1.7.13 (latest) to resolve [GHSA-7ww5-4wqc-m92c](https://osv.dev/vulnerability/GO-2023-2412). | ||
``` | ||
```release-note:security | ||
Upgrade docker/docker to 25.0.3+incompatible (latest) to resolve [GHSA-jq35-85cj-fj4p](https://osv.dev/vulnerability/GHSA-jq35-85cj-fj4p). | ||
``` | ||
```release-note:security | ||
Upgrade docker/distribution to 2.8.3+incompatible (latest) to resolve [CVE-2023-2253](https://osv.dev/vulnerability/CVE-2023-2253). | ||
``` | ||
```release-note:security | ||
Upgrade filepath-securejoin to 0.2.4 (latest) to resolve [GO-2023-2048](https://osv.dev/vulnerability/GO-2023-2048). | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: get-go-version | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
go-version: | ||
description: "The Go version detected by this workflow" | ||
value: ${{ jobs.get-go-version.outputs.go-version }} | ||
|
||
jobs: | ||
get-go-version: | ||
name: "Determine Go toolchain version" | ||
runs-on: ubuntu-latest | ||
outputs: | ||
go-version: ${{ steps.get-go-version.outputs.go-version }} | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- name: Determine Go version | ||
id: get-go-version | ||
# We use .go-version as our source of truth for current Go | ||
# version, because "goenv" can react to it automatically. | ||
# | ||
# In the future, we can transition from .go-version and goenv to | ||
# Go 1.21 `toolchain` directives by updating this workflow rather | ||
# than individually setting `go-version-file` in each `setup-go` | ||
# job (as of 2024-01-03, `setup-go` does not support `toolchain`). | ||
run: | | ||
GO_VERSION=$(head -n 1 .go-version) | ||
echo "Building with Go ${GO_VERSION}" | ||
echo "go-version=${GO_VERSION}" >> $GITHUB_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Security Scan | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release/** | ||
pull_request: | ||
branches: | ||
- main | ||
- release/** | ||
|
||
# cancel existing runs of the same workflow on the same ref | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
get-go-version: | ||
uses: ./.github/workflows/reusable-get-go-version.yml | ||
|
||
scan: | ||
needs: | ||
- get-go-version | ||
runs-on: ubuntu-latest | ||
# The first check ensures this doesn't run on community-contributed PRs, who | ||
# won't have the permissions to run this job. | ||
if: ${{ (github.repository != 'hashicorp/consul-k8s' || (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) | ||
&& (github.actor != 'dependabot[bot]') && (github.actor != 'hc-github-team-consul-core') }} | ||
|
||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version: ${{ needs.get-go-version.outputs.go-version }} | ||
|
||
- name: Clone Security Scanner repo | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
with: | ||
repository: hashicorp/security-scanner | ||
#TODO: replace w/ HASHIBOT_PRODSEC_GITHUB_TOKEN once provisioned | ||
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }} | ||
path: security-scanner | ||
ref: main | ||
|
||
- name: Scan | ||
id: scan | ||
uses: ./security-scanner | ||
with: | ||
repository: "$PWD" | ||
# See scan.hcl at repository root for config. | ||
|
||
- name: SARIF Output | ||
shell: bash | ||
run: | | ||
cat results.sarif | jq | ||
|
||
- name: Upload SARIF file | ||
uses: github/codeql-action/upload-sarif@46a6823b81f2d7c67ddf123851eea88365bc8a67 # codeql-bundle-v2.13.5 | ||
with: | ||
sarif_file: results.sarif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
# These scan results are run as part of CRT workflows. | ||
|
||
# Un-triaged results will block release. See `security-scanner` docs for more | ||
# information on how to add `triage` config to unblock releases for specific results. | ||
# In most cases, we should not need to disable the entire scanner to unblock a release. | ||
|
||
# To run manually, install scanner and then from the repository root run | ||
# `SECURITY_SCANNER_CONFIG_FILE=.release/security-scan.hcl scan ...` | ||
# To scan a local container, add `local_daemon = true` to the `container` block below. | ||
# See `security-scanner` docs or run with `--help` for scan target syntax. | ||
|
||
container { | ||
dependencies = true | ||
alpine_secdb = true | ||
secrets = true | ||
|
||
secrets { | ||
all = true | ||
} | ||
} | ||
|
||
binary { | ||
secrets = true | ||
go_modules = false | ||
go_modules = true | ||
osv = true | ||
oss_index = false | ||
nvd = false | ||
|
||
secrets { | ||
all = true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocking, but would align w/ the token used in core.