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

Skalantari/migrate to the latest azure container registry sdk #3

Open
wants to merge 68 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
ac85e25
docs: some improvement in release instructions (#1815)
junczhu Sep 24, 2024
d3e49d2
chore: update the roadmap after v1.3.0 release (#1817)
yizha1 Sep 25, 2024
77fbbaf
chore: Bump github/codeql-action from 3.26.8 to 3.26.9 (#1828)
dependabot[bot] Sep 25, 2024
8d72736
chore: Bump vscode/devcontainers/go from `44c273a` to `68e6bd3` in /.…
dependabot[bot] Sep 25, 2024
2a7ec4d
chore: Bump actions/checkout from 4.1.7 to 4.2.0 (#1830)
dependabot[bot] Sep 27, 2024
aea7688
chore: Bump notaryproject/notation-action from 1.1.0 to 1.2.0 (#1832)
dependabot[bot] Sep 30, 2024
c260f3b
chore: Bump github.com/aws/aws-sdk-go-v2/credentials from 1.17.34 to …
dependabot[bot] Sep 30, 2024
70e4744
chore: Bump vscode/devcontainers/go from `68e6bd3` to `d638d11` in /.…
dependabot[bot] Sep 30, 2024
d72b0d7
chore: Bump golang from `4594271` to `ddad330` in /httpserver (#1837)
dependabot[bot] Oct 1, 2024
8786419
chore: Bump distroless/static from `dcd3f1f` to `26f9b99` in /httpser…
dependabot[bot] Oct 1, 2024
036beb9
chore: Bump github/codeql-action from 3.26.9 to 3.26.10 (#1840)
dependabot[bot] Oct 1, 2024
6bf96b0
chore: Bump golang/govulncheck-action from 1.0.3 to 1.0.4 (#1841)
dependabot[bot] Oct 2, 2024
ad5cdcf
chore: Bump codecov/codecov-action from 4.5.0 to 4.6.0 (#1842)
dependabot[bot] Oct 2, 2024
b94c067
chore: Bump golangci/golangci-lint-action from 6.1.0 to 6.1.1 (#1845)
dependabot[bot] Oct 3, 2024
5327afe
docs: add commits doc to contributing guide (#1844)
susanshi Oct 7, 2024
6fd804f
chore: Bump github/codeql-action from 3.26.10 to 3.26.11 (#1846)
dependabot[bot] Oct 7, 2024
8162d6a
chore: Bump golang from `ddad330` to `628529a` in /httpserver (#1847)
dependabot[bot] Oct 7, 2024
1af7001
chore: Bump vscode/devcontainers/go from `d638d11` to `bdecb4c` in /.…
dependabot[bot] Oct 7, 2024
b41acf8
chore: Bump github.com/aws/aws-sdk-go-v2/config from 1.27.36 to 1.27.…
dependabot[bot] Oct 7, 2024
96fb63d
chore: Bump google.golang.org/grpc from 1.66.2 to 1.66.3 (#1850)
dependabot[bot] Oct 7, 2024
7ce62b7
chore: Bump sigstore/cosign-installer from 3.6.0 to 3.7.0 (#1851)
dependabot[bot] Oct 7, 2024
2b1890b
chore: Bump actions/upload-artifact from 4.4.0 to 4.4.1 (#1855)
dependabot[bot] Oct 8, 2024
f6fae7e
chore: Bump actions/checkout from 4.2.0 to 4.2.1 (#1857)
dependabot[bot] Oct 8, 2024
1ecd21f
chore: Bump github/codeql-action from 3.26.11 to 3.26.12 (#1856)
dependabot[bot] Oct 9, 2024
957207b
chore: Bump github/codeql-action from 3.26.12 to 3.26.13 (#1869)
dependabot[bot] Oct 15, 2024
6f96ebc
chore: Bump golang from `628529a` to `b274ff1` in /httpserver (#1865)
dependabot[bot] Oct 15, 2024
4ed4425
chore: Bump actions/upload-artifact from 4.4.1 to 4.4.3 (#1859)
dependabot[bot] Oct 15, 2024
85781cc
feat: additional env vars for ratify container via helm chart (#1854)
mannbiher Oct 16, 2024
6376762
ci: replace trivy with trivy-action (#1871)
binbin-li Oct 16, 2024
130194f
chore: Bump anchore/sbom-action from 0.17.2 to 0.17.4 (#1872)
dependabot[bot] Oct 16, 2024
1757d2a
chore: Bump aquasecurity/trivy-action from 0.27.0 to 0.28.0 (#1873)
dependabot[bot] Oct 16, 2024
deafb4a
chore: Bump github.com/aws/aws-sdk-go-v2/config from 1.27.41 to 1.27.…
dependabot[bot] Oct 16, 2024
7213fed
chore: Bump golang from `b274ff1` to `0ca97f4` in /httpserver (#1876)
dependabot[bot] Oct 21, 2024
c8e8e00
chore: Bump github.com/prometheus/client_golang from 1.20.4 to 1.20.5…
dependabot[bot] Oct 21, 2024
a9ee776
chore: Bump vscode/devcontainers/go from `bdecb4c` to `46f85d1` in /.…
dependabot[bot] Oct 21, 2024
9c40fba
chore: bump up go version to 1.22.8 (#1880)
binbin-li Oct 21, 2024
ea3cee5
chore: Bump github.com/sigstore/sigstore from 1.8.9 to 1.8.10 (#1878)
dependabot[bot] Oct 21, 2024
1d653d4
chore: migrate azure-sdk-for-go/containerregistry to the latest release
shahramk64 Sep 24, 2024
c7137d8
chore: refactor to enable mocking and add unit tests to azureworkloa…
shahramk64 Sep 29, 2024
b1a397a
chore: lint
shahramk64 Sep 29, 2024
24d306d
chore: address comments
shahramk64 Sep 29, 2024
c5d87bf
chore: add comments
shahramk64 Sep 30, 2024
0d4e8a6
chore: more unit tests
shahramk64 Oct 1, 2024
cf5e7f0
chore: remove unnecessary functions
shahramk64 Oct 3, 2024
f213c5f
fix: fix the bugs in the unit tests
shahramk64 Oct 3, 2024
3ec6a2d
fix: provide default implementation of the functions
shahramk64 Oct 4, 2024
23cf3d2
chore: refactor
shahramk64 Oct 9, 2024
598ff9e
chore: refactor azureworkloadidentity
shahramk64 Oct 10, 2024
03688b0
chore: refactor azureidentity.go
shahramk64 Oct 10, 2024
2a0c8d8
chore: move common code to helper.go
shahramk64 Oct 11, 2024
947f28c
chore: unit tests for the helper.go file
shahramk64 Oct 13, 2024
d50d306
chore: create a const from the repetitive string
shahramk64 Oct 15, 2024
ac8e29e
chore: address comments
shahramk64 Oct 15, 2024
2344927
chore: address comments
shahramk64 Oct 17, 2024
10ea3e2
chore: address comments
shahramk64 Oct 21, 2024
94f899d
fix: ran go mod tidy
shahramk64 Oct 21, 2024
12b4446
docs: design proposal for tag and digest co-existing [ISSUE 1657] (#1…
emalprokt Oct 22, 2024
5083cd4
docs: add CRL Design (#1789)
junczhu Oct 22, 2024
cc80ff8
docs: Create proposal for verifying 'last-n' artifacts only. (#1797)
asafalgawi Oct 22, 2024
cf25a94
Merge branch 'dev' into skalantari/Migrate-to-the-latest-Azure-contai…
susanshi Oct 22, 2024
f578982
docs: nVersionCount support for KMP design doc (#1831)
duffney Oct 22, 2024
82c3091
Merge branch 'dev' into skalantari/Migrate-to-the-latest-Azure-contai…
susanshi Oct 22, 2024
44abd8b
ci: retry trivy db update upon failure (#1881)
binbin-li Oct 22, 2024
75ed5ba
chore: Bump anchore/sbom-action from 0.17.4 to 0.17.5 (#1882)
dependabot[bot] Oct 22, 2024
df7fdff
ci: fix tagging in publish-ghcr workflow (#1884)
binbin-li Oct 23, 2024
c4adde7
ci: retry trivy download-db on failure (#1883)
binbin-li Oct 23, 2024
dfd5e9a
Merge branch 'dev' into skalantari/Migrate-to-the-latest-Azure-contai…
susanshi Oct 23, 2024
a70ebef
chore: remove commented code
shahramk64 Oct 23, 2024
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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/go/.devcontainer/base.Dockerfile

# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1.22-bullseye, 1.21-bullseye, 1, 1.19, 1.18, 1-bullseye, 1.19-bullseye, 1.18-bullseye, 1-buster, 1.19-buster, 1.18-buster
FROM mcr.microsoft.com/vscode/devcontainers/go:1.22-bullseye@sha256:44c273a0506ee6c7c13f4f0c1abe8dd077469ac9f3ae6be0617d6c59a1256089
FROM mcr.microsoft.com/vscode/devcontainers/go:1.22-bullseye@sha256:46f85d17eff2b121269b4ed547eb366c2499b5f549d8eaa16fbe6e38f04dfb93

# [Choice] Node.js version: none, lts/*, 18, 16, 14
ARG NODE_VERSION="none"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
egress-policy: audit

- name: Check out code into the Go module directory
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set up Go 1.22
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ jobs:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag=3.0.2
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # tag=3.0.2
- name: setup go environment
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: "1.22"
- name: Initialize CodeQL
uses: github/codeql-action/init@294a9d92911152fe08befb9ec03e240add280cb3 # tag=v3.26.8
uses: github/codeql-action/init@f779452ac5af1c261dce0346a8f964149f49322b # tag=v3.26.13
with:
languages: go
- name: Run tidy
run: go mod tidy
- name: Build CLI
run: make build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@294a9d92911152fe08befb9ec03e240add280cb3 # tag=v3.26.8
uses: github/codeql-action/analyze@f779452ac5af1c261dce0346a8f964149f49322b # tag=v3.26.13
4 changes: 2 additions & 2 deletions .github/workflows/e2e-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
egress-policy: audit

- name: Check out code into the Go module directory
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set up Go 1.22
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
make e2e-aks KUBERNETES_VERSION=${{ inputs.k8s_version }} GATEKEEPER_VERSION=${{ inputs.gatekeeper_version }} TENANT_ID=${{ secrets.AZURE_TENANT_ID }} AZURE_SP_OBJECT_ID=${{ secrets.AZURE_SP_OBJECT_ID }}

- name: Upload artifacts
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: ${{ always() }}
with:
name: e2e-logs-aks-${{ inputs.k8s_version }}-${{ inputs.gatekeeper_version }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/e2e-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
egress-policy: audit

- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
- name: Check license header
uses: apache/skywalking-eyes/header@cd7b195c51fd3d6ad52afceb760719ddc6b3ee91
with:
Expand All @@ -39,7 +39,7 @@ jobs:
egress-policy: audit

- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
- name: setup go environment
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
Expand All @@ -51,7 +51,7 @@ jobs:
- name: Check build
run: bin/ratify version
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Run helm lint
Expand All @@ -68,7 +68,7 @@ jobs:
egress-policy: audit

- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: setup go environment
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
Expand All @@ -84,7 +84,7 @@ jobs:
make install ratify-config install-bats
make test-e2e-cli GOCOVERDIR=${GITHUB_WORKSPACE}/test/e2e/.cover
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
markdown-link-check:
Expand All @@ -96,7 +96,7 @@ jobs:
egress-policy: audit

- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
submodules: recursive
- name: Run link check
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
egress-policy: audit

- name: Check out code into the Go module directory
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set up Go 1.22
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
kubectl logs -n gatekeeper-system -l app=ratify --tail=-1 > logs-ratify-preinstall-${{ matrix.KUBERNETES_VERSION }}-${{ matrix.GATEKEEPER_VERSION }}-rego-policy.json
kubectl logs -n gatekeeper-system -l app.kubernetes.io/name=ratify --tail=-1 > logs-ratify-${{ matrix.KUBERNETES_VERSION }}-${{ matrix.GATEKEEPER_VERSION }}-rego-policy.json
- name: Upload artifacts
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: ${{ always() }}
with:
name: e2e-logs-${{ inputs.k8s_version }}-${{ inputs.gatekeeper_version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: "1.22"
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: golangci-lint
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: v1.59.1
args: --timeout=10m
4 changes: 2 additions & 2 deletions .github/workflows/high-availability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
egress-policy: audit

- name: Check out code into the Go module directory
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set up Go 1.22
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
Expand All @@ -60,7 +60,7 @@ jobs:
kubectl logs -n gatekeeper-system -l app=ratify --tail=-1 > logs-ratify-preinstall-${{ matrix.DAPR_VERSION }}.json
kubectl logs -n gatekeeper-system -l app.kubernetes.io/name=ratify --tail=-1 > logs-ratify-${{ matrix.DAPR_VERSION }}.json
- name: Upload artifacts
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: ${{ always() }}
with:
name: e2e-logs-${{ matrix.DAPR_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
egress-policy: audit

- name: git checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
- name: Publish Helm charts
uses: stefanprodan/helm-gh-pages@0ad2bb377311d61ac04ad9eb6f252fb68e207260 # v1.7.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-cosign-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
egress-policy: audit

- name: Install cosign
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0

- name: Get repo
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-dev-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
- name: Install Notation
uses: notaryproject/notation-action/setup@104aa999103172f827373af8ac14dde7aa6d28f1 # v1.1.0
uses: notaryproject/notation-action/setup@03242349f62aeddc995e12c6fbcea3b87697873f # v1.2.0
- name: Install cosign
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
- name: Az CLI login
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
with:
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
helm push ratify-${{ steps.prepare.outputs.semversion }}.tgz oci://${{ steps.prepare.outputs.chartrepo }}
helm push ratify-${{ steps.prepare.outputs.semversionrolling }}.tgz oci://${{ steps.prepare.outputs.chartrepo }}
- name: Sign with Notation
uses: notaryproject/notation-action/sign@104aa999103172f827373af8ac14dde7aa6d28f1 # v1.1.0
uses: notaryproject/notation-action/sign@03242349f62aeddc995e12c6fbcea3b87697873f # v1.2.0
with:
plugin_name: azure-kv
plugin_url: ${{ vars.AZURE_KV_PLUGIN_URL }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
- name: prepare
id: prepare
run: |
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
--attest type=sbom \
--attest type=provenance,mode=max \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--build-arg LDFLAGS="-X github.com/ratify-project/ratify/internal/version.Version=$(TAG)" \
--build-arg LDFLAGS="-X github.com/ratify-project/ratify/internal/version.Version=$TAG" \
--label org.opencontainers.image.revision=${{ github.sha }} \
-t ${{ steps.prepare.outputs.baseref }} \
--push .
Expand All @@ -79,7 +79,7 @@ jobs:
--build-arg build_licensechecker=true \
--build-arg build_schemavalidator=true \
--build-arg build_vulnerabilityreport=true \
--build-arg LDFLAGS="-X github.com/ratify-project/ratify/internal/version.Version=$(TAG)" \
--build-arg LDFLAGS="-X github.com/ratify-project/ratify/internal/version.Version=$TAG" \
--label org.opencontainers.image.revision=${{ github.sha }} \
-t ${{ steps.prepare.outputs.ref }} \
--push .
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/quick-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
egress-policy: audit

- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: setup go environment
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
Expand All @@ -59,7 +59,7 @@ jobs:
kubectl logs -n gatekeeper-system -l app=ratify --tail=-1 > logs-ratify-preinstall-${{ matrix.KUBERNETES_VERSION }}-config-policy.json
kubectl logs -n gatekeeper-system -l app.kubernetes.io/name=ratify --tail=-1 > logs-ratify-${{ matrix.KUBERNETES_VERSION }}-config-policy.json
- name: Upload artifacts
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: ${{ always() }}
with:
name: e2e-logs-${{ matrix.KUBERNETES_VERSION }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
egress-policy: audit

- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag=3.0.2
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # tag=3.0.2
with:
fetch-depth: 0

- name: Install Syft
uses: anchore/sbom-action/download-syft@61119d458adab75f756bc0b9e4bde25725f86a7a # v0.17.2
uses: anchore/sbom-action/download-syft@1ca97d9028b51809cf6d3c934c3e160716e1b605 # v0.17.5

- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
Expand All @@ -49,7 +49,7 @@ jobs:
$RUNNER_TEMP/sbom-tool generate -b . -bc . -pn ratify -pv $GITHUB_REF_NAME -ps Microsoft -nsb https://microsoft.com -V Verbose

- name: Upload a Build Artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # tag=v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # tag=v4.4.3
with:
name: SBOM SPDX files
path: _manifest/spdx_2.2/**
2 changes: 1 addition & 1 deletion .github/workflows/run-full-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
egress-policy: audit

- name: Check out code into the Go module directory
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set up Go 1.22
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
Expand Down
28 changes: 19 additions & 9 deletions .github/workflows/scan-vulns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,43 @@ jobs:
with:
go-version: "1.22"
check-latest: true
- uses: golang/govulncheck-action@dd0578b371c987f96d1185abb54344b44352bd58 # v1.0.3
- uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4

scan_vulnerabilities:
name: "[Trivy] Scan for vulnerabilities"
runs-on: ubuntu-22.04
timeout-minutes: 15
env:
TRIVY_VERSION: 0.49.1
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- name: Check out code into the Go module directory
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871

- name: Download trivy
run: |
pushd $(mktemp -d)
wget https://github.com/aquasecurity/trivy/releases/download/v${{ env.TRIVY_VERSION }}/trivy_${{ env.TRIVY_VERSION }}_Linux-64bit.tar.gz
tar zxvf trivy_${{ env.TRIVY_VERSION }}_Linux-64bit.tar.gz
echo "$(pwd)" >> $GITHUB_PATH
env:
TRIVY_VERSION: "0.46.0"

- name: Download vulnerability database
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
with:
max_attempts: 3
retry_on: error
timeout_seconds: 30
retry_wait_seconds: 5
command: |
trivy image --download-db-only

- name: Run trivy on git repository
run: |
trivy fs --format table --ignore-unfixed --scanners vuln .
trivy fs --skip-db-update --format table --ignore-unfixed --scanners vuln .

- name: Build docker images
run: |
Expand All @@ -66,10 +76,10 @@ jobs:
- name: Run trivy on images for all severity
run: |
for img in "localbuild:test" "localbuildcrd:test"; do
trivy image --ignore-unfixed --vuln-type="os,library" "${img}"
trivy image --skip-db-update --ignore-unfixed --vuln-type="os,library" "${img}"
done
- name: Run trivy on images and exit on HIGH severity
- name: Run trivy on images and exit on HIGH/CRITICAL severity
run: |
for img in "localbuild:test" "localbuildcrd:test"; do
trivy image --ignore-unfixed --exit-code 1 --severity HIGH --vuln-type="os,library" "${img}"
done
trivy image --skip-db-update --ignore-unfixed --exit-code 1 --severity HIGH,CRITICAL --vuln-type="os,library" "${img}"
done
6 changes: 3 additions & 3 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
egress-policy: audit

- name: "Checkout code"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag=3.0.2
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # tag=3.0.2
with:
persist-credentials: false

Expand All @@ -48,13 +48,13 @@ jobs:
publish_results: true

- name: "Upload artifact"
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # tag=v4.4.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # tag=v4.4.3
with:
name: SARIF file
path: results.sarif
retention-days: 5

- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@294a9d92911152fe08befb9ec03e240add280cb3 # tag=v3.26.8
uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # tag=v3.26.13
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/sync-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
- uses: everlytic/branch-merge@c4a244dc23143f824ae6c022a10732566cb8e973
with:
github_token: ${{ github.token }}
Expand Down
Loading
Loading