Skip to content

Commit ba712f2

Browse files
authored
Merge pull request #7 from coder/merge
Update Kaniko
2 parents f83d152 + 801deae commit ba712f2

File tree

3,729 files changed

+345912
-138214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,729 files changed

+345912
-138214
lines changed

.github/workflows/images.yaml

+8-6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
- warmer
3232

3333
include:
34+
35+
3436
- image: executor
3537
target: kaniko-executor
3638
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
@@ -64,13 +66,13 @@ jobs:
6466

6567
# Setup auth if not a PR.
6668
- if: github.event_name != 'pull_request'
67-
uses: google-github-actions/auth@35b0e87d162680511bf346c299f71c9c5c379033 # v1.1.1
69+
uses: google-github-actions/auth@55bd3a7c6e2ae7cf1877fd1ccb9d54c0503c457c # v2.1.2
6870
with:
6971
credentials_json: '${{ secrets.GCR_DEVOPS_SERVICE_ACCOUNT_KEY }}'
7072
export_environment_variables: true
7173
create_credentials_file: true
7274
- if: github.event_name != 'pull_request'
73-
uses: google-github-actions/setup-gcloud@e30db14379863a8c79331b04a9969f4c1e225e0b # v1.1.1
75+
uses: google-github-actions/setup-gcloud@98ddc00a17442e89a24bbf282954a3b65ce6d200 # v2.1.0
7476
- if: github.event_name != 'pull_request'
7577
run: gcloud auth configure-docker
7678

@@ -85,11 +87,11 @@ jobs:
8587
echo "platforms=${platforms}" >> $GITHUB_OUTPUT
8688
fi
8789
# Build and push with Docker.
88-
- uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0
90+
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
8991
with:
9092
platforms: ${{ matrix.platforms }}
91-
- uses: docker/setup-buildx-action@16c0bc4a6e6ada2cfd8afd41d22d95379cf7c32a # v1
92-
- uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
93+
- uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v1
94+
- uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
9395
id: build-and-push
9496
with:
9597
context: .
@@ -105,7 +107,7 @@ jobs:
105107

106108
# Sign images if not a PR.
107109
- if: github.event_name != 'pull_request'
108-
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1
110+
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
109111
- if: github.event_name != 'pull_request'
110112
run: |
111113
cosign sign --yes \

.github/workflows/integration-tests.yaml

+10-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
env:
1616
IMAGE_REPO: 'localhost:5000'
1717
REGISTRY: 'localhost:5000'
18+
DOCKER_BUILDKIT: '0'
1819
strategy:
1920
fail-fast: false
2021
matrix:
@@ -25,11 +26,17 @@ jobs:
2526
- k8s-executor-build-push integration-test-k8s
2627

2728
steps:
28-
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
29+
- name: Maximize build space
30+
uses: AdityaGarg8/remove-unwanted-software@v3
2931
with:
30-
go-version: '1.20'
32+
remove-android: 'true'
33+
remove-dotnet: 'true'
34+
remove-haskell: 'true'
35+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
36+
with:
37+
go-version: '1.22'
3138
- uses: actions/checkout@b0e28b5ac45a892f91e7d036f8200cf5ed489415 # v3
32-
- uses: docker/setup-buildx-action@16c0bc4a6e6ada2cfd8afd41d22d95379cf7c32a # v1
39+
- uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v1
3340

3441
- run: make install-container-diff k3s-setup
3542
- run: make ${{ matrix.make-target }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Nightly Vulnerability Scan
2+
3+
on:
4+
schedule:
5+
# Schedule to run every night at midnight
6+
- cron: '0 0 * * *'
7+
8+
jobs:
9+
vulnerability-scan:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Grype
17+
run: |
18+
# Install Grype
19+
curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin
20+
21+
- name: Get latest commit SHA of Kaniko project
22+
id: get-commit
23+
run: |
24+
LATEST_COMMIT_SHA=$(git rev-parse HEAD)
25+
echo "Latest commit SHA: $LATEST_COMMIT_SHA"
26+
echo "::set-output name=sha::$LATEST_COMMIT_SHA"
27+
28+
- name: Scan the latest CI/CD image
29+
run: |
30+
IMAGE_ID="gcr.io/kaniko-project/executor:${{ steps.get-commit.outputs.sha }}"
31+
echo "Scanning image $IMAGE_ID"
32+
grype $IMAGE_ID > grype-output.txt
33+
34+
- name: Check for vulnerabilities and create an issue
35+
run: |
36+
if grep -q 'No vulnerabilities found' grype-output.txt; then
37+
echo "No vulnerabilities found."
38+
else
39+
gh issue create --title "Vulnerabilities Found in Nightly Scan" --body "Vulnerabilities found in the latest image scan. Please check the attached report." --file grype-output.txt
40+
fi

.github/workflows/unit-tests.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ jobs:
1313
tests:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.01
16+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v4.01
1717
with:
18-
go-version: '1.20'
18+
go-version: '1.22'
1919
- uses: actions/checkout@b0e28b5ac45a892f91e7d036f8200cf5ed489415 # v3
20-
2120
- run: make test

0 commit comments

Comments
 (0)