Skip to content

Commit 49c1e83

Browse files
committed
Merge branch 'main' into az-migration
2 parents 65601f2 + 9e67328 commit 49c1e83

File tree

115 files changed

+4729
-1360
lines changed

Some content is hidden

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

115 files changed

+4729
-1360
lines changed

.github/workflows/assertion.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
required: false
1818
default: false
1919

20+
permissions:
21+
contents: read
22+
2023
jobs:
2124
build-assertion-document:
2225
name: Create Assertion Document

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,14 @@ jobs:
9292
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
9393
with:
9494
version: v2.4.0
95+
skip-cache: true
9596

9697
vulnerability-scan:
9798
name: Vulnerability Scan
9899
uses: ./.github/workflows/vulncheck.yml
99100
permissions:
100-
security-events: write
101+
contents: read
102+
security-events: write # for reporting vulnerabilities via code-scanning API
101103
with:
102104
target-branch: ${{ github.event.pull_request.base.ref || github.ref_name }}
103105

@@ -667,7 +669,7 @@ jobs:
667669
needs: build-unsigned-snapshot
668670
permissions:
669671
id-token: write
670-
contents: write
672+
contents: write # Needed for pushing benchmark results to github branch
671673
steps:
672674
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
673675
- name: Get Secrets from Azure Key Vault
@@ -714,7 +716,7 @@ jobs:
714716
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
715717
permissions:
716718
id-token: write
717-
contents: write
719+
contents: write # Needed for pushing benchmark results to github branch
718720
runs-on: ubuntu-22.04
719721
needs: build-unsigned-snapshot
720722
steps:
@@ -738,7 +740,7 @@ jobs:
738740
path: build
739741

740742
- name: Set up Docker Build
741-
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
743+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
742744

743745
- name: Set env
744746
run: echo "GO_VERSION=$(cat go.mod | grep toolchain | sed 's/toolchain //; s/go//')" >> $GITHUB_ENV

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ jobs:
2727
- name: "Dependency Review"
2828
uses: actions/dependency-review-action@3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261 # v4.8.2
2929
with:
30-
config-file: "nginxinc/k8s-common/dependency-review-config.yml@main"
30+
config-file: "nginx/k8s-common/dependency-review-config.yml@main"

.github/workflows/nightly-scans.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,24 @@ on:
44
- cron: '0 2 * * *' # Runs daily at 2:00 AM UTC
55
workflow_dispatch:
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
scan-main:
912
name: Vulnerability Scan - Main
1013
uses: ./.github/workflows/vulncheck.yml
14+
permissions:
15+
contents: read
16+
security-events: write # for reporting vulnerabilities via code-scanning API
1117
with:
1218
target-branch: 'main'
1319

1420
scan-v2:
1521
name: Vulnerability Scan - dev-v2
1622
uses: ./.github/workflows/vulncheck.yml
23+
permissions:
24+
contents: read
25+
security-events: write # for reporting vulnerabilities via code-scanning API
1726
with:
1827
target-branch: 'dev-v2'

.github/workflows/release-branch.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ jobs:
185185
runs-on: ubuntu-22.04
186186
needs: [vars,release-draft]
187187
permissions:
188-
contents: write
188+
contents: write # Needed to tag a release
189189
steps:
190190
- name: Checkout Repository
191191
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -206,8 +206,7 @@ jobs:
206206
runs-on: ubuntu-22.04-amd64
207207
needs: [vars,release-draft,tag-release]
208208
permissions:
209-
id-token: write
210-
contents: write # Needed to update a release
209+
id-token: write # Needed to get a token to upload packages to NGINX repo
211210
steps:
212211
- name: Checkout Repository
213212
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -294,7 +293,7 @@ jobs:
294293
runs-on: ubuntu-22.04
295294
needs: [vars,tag-release]
296295
permissions:
297-
pull-requests: write
296+
pull-requests: write # Needed to create pull request back into main branch
298297
steps:
299298
- name: Checkout Repository
300299
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

.github/workflows/scorecards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ jobs:
5555

5656
# Upload the results to GitHub's code scanning dashboard.
5757
- name: "Upload to code-scanning"
58-
uses: github/codeql-action/upload-sarif@1b168cd39490f61582a9beae412bb7057a6b2c4e # v4.31.8
58+
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
5959
with:
6060
sarif_file: results.sarif

.github/workflows/upload-release-assets.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ defaults:
2525
shell: bash
2626

2727
permissions:
28-
contents: write
28+
contents: read
2929

3030
jobs:
3131
vars:
@@ -51,6 +51,8 @@ jobs:
5151
name: Upload assets
5252
runs-on: ubuntu-22.04
5353
needs: [vars]
54+
permissions:
55+
contents: write # Needed for uploading release assets to GitHub
5456
steps:
5557
- name: Checkout Repository
5658
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

.github/workflows/vulncheck.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
required: true
1515
default: 'main'
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
vulncheck:
1922
name: Vulnerability Check
@@ -25,7 +28,7 @@ jobs:
2528
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
2629
with:
2730
fetch-depth: 0
28-
ref: ${{ inputs.targetBranch || github.event.inputs.target-branch }}
31+
ref: ${{ inputs.targetBranch || 'main' }}
2932

3033
- name: Check Go version
3134
id: get-go-version

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ whitesource/
77
.vscode/
88
.idea/
99
*.log
10+
!**/testdata/*.log
1011
*.test
1112
*.orig
1213
sdk/certs/**

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ $(RPM_PACKAGE):
110110
include Makefile.tools
111111
include Makefile.containers
112112
include Makefile.packaging
113+
include Makefile.weaver
113114

114115
.PHONY: help clean no-local-changes build lint format unit-test integration-test run dev run-mock-management-grpc-server generate generate-mocks local-apk-package local-deb-package local-rpm-package
115116
help: ## Show help message
@@ -282,7 +283,7 @@ stop-mock-otel-collector-without-nap: ## Stop running mock management plane OTel
282283
@echo "Stopping mock management plane OTel collector without NAP"
283284
AGENT_IMAGE_WITH_NGINX_PLUS=nginx_plus_$(IMAGE_TAG):latest AGENT_IMAGE_WITH_NGINX_OSS=nginx_oss_$(IMAGE_TAG):latest $(CONTAINER_COMPOSE) -f ./test/mock/collector/docker-compose.yaml down
284285

285-
generate: ## Generate golang code
286+
generate: nginx-metadata-gen nginxplus-metadata-gen ## Generate golang code
286287
@echo "🗄️ Generating proto files"
287288
@cd api/grpc && $(GORUN) $(BUF) generate
288289
@echo "🗃️ Generating go files"

0 commit comments

Comments
 (0)