Skip to content

Commit 2d92dc9

Browse files
authored
Merge branch 'main' into chore/add-more-linters
2 parents 89025aa + 201a3a3 commit 2d92dc9

File tree

5 files changed

+34
-34
lines changed

5 files changed

+34
-34
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branches:
1010
- main
1111
schedule:
12-
- cron: "16 6 * * 4" # run at 6:16am UTC on Thursdays
12+
- cron: "16 6 * * 4" # run every Thursday at 06:16 UTC
1313

1414
concurrency:
1515
group: ${{ github.ref_name }}-codeql
@@ -23,56 +23,51 @@ jobs:
2323
name: Analyze
2424
runs-on: ubuntu-24.04
2525
permissions:
26-
actions: read
27-
contents: read
28-
security-events: write
26+
actions: read # for github/codeql-action/init to get workflow details
27+
contents: read # for actions/checkout to fetch code
28+
security-events: write # for github/codeql-action/autobuild to send a status report
29+
packages: read # required to fetch internal or private CodeQL packs
2930

3031
strategy:
3132
fail-fast: false
3233
matrix:
33-
language: ["go", "python"]
34-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
35-
# Use only 'java' to analyze code written in Java, Kotlin or both
36-
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
37-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
34+
include:
35+
- language: go
36+
build-mode: autobuild
37+
- language: python
38+
build-mode: none
39+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
40+
# Use `c-cpp` to analyze code written in C, C++ or both
41+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
42+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
43+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
44+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
45+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
46+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
3847

3948
steps:
4049
- name: Checkout repository
4150
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4251

52+
- name: Setup Golang Environment
53+
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
54+
with:
55+
go-version: stable
56+
if: matrix.language == 'go'
57+
4358
# Initializes the CodeQL tools for scanning.
4459
- name: Initialize CodeQL
4560
uses: github/codeql-action/init@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
4661
with:
4762
languages: ${{ matrix.language }}
63+
build-mode: ${{ matrix.build-mode }}
4864
# If you wish to specify custom queries, you can do so here or in a config file.
4965
# By default, queries listed here will override any specified in a config file.
5066
# Prefix the list here with "+" to use these queries and those in the config file.
5167

5268
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
5369
# queries: security-extended,security-and-quality
5470

55-
- name: Setup Golang Environment
56-
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
57-
with:
58-
go-version: stable
59-
if: matrix.language == 'go'
60-
61-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
62-
# If this step fails, then you should remove it and run the build manually (see below)
63-
- name: Autobuild
64-
uses: github/codeql-action/autobuild@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
65-
66-
# ℹ️ Command-line programs to run using the OS shell.
67-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
68-
69-
# If the Autobuild fails above, remove it and uncomment the following three lines.
70-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
71-
72-
# - run: |
73-
# echo "Run, Build Application using script"
74-
# ./location_of_script_within_repo/buildscript.sh
75-
7671
- name: Perform CodeQL Analysis
7772
uses: github/codeql-action/analyze@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
7873
with:

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ jobs:
2222
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2323

2424
- name: Dependency Review
25-
uses: actions/dependency-review-action@72eb03d02c7872a771aacd928f3123ac62ad6d3a # v4.3.3
25+
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
2626
with:
2727
config-file: "nginxinc/k8s-common/dependency-review-config.yml@main"

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,10 @@ repos:
5151
hooks:
5252
- id: markdownlint-cli2
5353

54+
- repo: https://github.com/adrienverge/yamllint.git
55+
rev: v1.35.1
56+
hooks:
57+
- id: yamllint
58+
5459
ci:
5560
skip: [golangci-lint-full]

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.11
1111
github.com/aws/aws-sdk-go-v2/service/autoscaling v1.43.3
1212
github.com/aws/aws-sdk-go-v2/service/ec2 v1.170.0
13-
github.com/nginxinc/nginx-plus-go-client v1.2.1
13+
github.com/nginxinc/nginx-plus-go-client v1.2.2
1414
gopkg.in/yaml.v2 v2.4.0
1515
)
1616

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw
6868
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
6969
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
7070
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
71-
github.com/nginxinc/nginx-plus-go-client v1.2.1 h1:65L9xgPDNbEbd23FTTCcaZ2qF9TX5/Z6vkkEl7RKiVo=
72-
github.com/nginxinc/nginx-plus-go-client v1.2.1/go.mod h1:n8OFLzrJulJ2fur28Cwa1Qp5DZNS2VicLV+Adt30LQ4=
71+
github.com/nginxinc/nginx-plus-go-client v1.2.2 h1:sl7HqNDDZq2EVu0eQQVoZ6PKYGa4h2dB/Qr5Ib0YKGw=
72+
github.com/nginxinc/nginx-plus-go-client v1.2.2/go.mod h1:n8OFLzrJulJ2fur28Cwa1Qp5DZNS2VicLV+Adt30LQ4=
7373
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
7474
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7575
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=

0 commit comments

Comments
 (0)