Skip to content

Commit 2cbb7dd

Browse files
committed
Update github workflows
1 parent 17db9f3 commit 2cbb7dd

File tree

4 files changed

+12
-54
lines changed

4 files changed

+12
-54
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
- reopened
1616
- synchronize
1717

18+
permissions:
19+
contents: read
20+
1821
env:
1922
NFPM_VERSION: 'v2.35.3'
2023

.github/workflows/codeql.yml

Lines changed: 4 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -55,57 +55,9 @@ jobs:
5555
permissions:
5656
actions: read # for github/codeql-action/init to get workflow details
5757
contents: read # for actions/checkout to fetch code
58+
packages: read
5859
security-events: write # for github/codeql-action/autobuild to send a status report
5960
name: Analyze
60-
runs-on: ubuntu-24.04
61-
62-
strategy:
63-
fail-fast: false
64-
matrix:
65-
language: ["go"]
66-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
67-
# Use only 'java' to analyze code written in Java, Kotlin or both
68-
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
69-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
70-
71-
steps:
72-
- name: Checkout repository
73-
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
74-
75-
# Initializes the CodeQL tools for scanning.
76-
- name: Initialize CodeQL
77-
uses: github/codeql-action/init@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
78-
with:
79-
languages: ${{ matrix.language }}
80-
# If you wish to specify custom queries, you can do so here or in a config file.
81-
# By default, queries listed here will override any specified in a config file.
82-
# Prefix the list here with "+" to use these queries and those in the config file.
83-
84-
# 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
85-
# queries: security-extended,security-and-quality
86-
87-
- name: Setup Golang Environment
88-
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
89-
with:
90-
go-version-file: go.mod
91-
if: matrix.language == 'go'
92-
93-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
94-
# If this step fails, then you should remove it and run the build manually (see below)
95-
- name: Autobuild
96-
uses: github/codeql-action/autobuild@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
97-
98-
# ℹ️ Command-line programs to run using the OS shell.
99-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
100-
101-
# If the Autobuild fails above, remove it and uncomment the following three lines.
102-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
103-
104-
# - run: |
105-
# echo "Run, Build Application using script"
106-
# ./location_of_script_within_repo/buildscript.sh
107-
108-
- name: Perform CodeQL Analysis
109-
uses: github/codeql-action/analyze@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
110-
with:
111-
category: "/language:${{matrix.language}}"
61+
uses: nginxinc/compliance-rules/.github/workflows/codeql.yml@c903bfe6c668eaba362cde6a7882278bc1564401 # v0.1
62+
with:
63+
requested_languages: go

.github/workflows/label-pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request_target:
55
types: [opened, reopened, synchronize]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
label-pr:
912
permissions:

.github/workflows/release-branch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
runs-on: ubuntu-22.04
8787
needs: [vars]
8888
permissions:
89-
contents: write
89+
contents: write # Needed to create draft release
9090
outputs:
9191
release_id: ${{ steps.vars.outputs.RELEASE_ID }}
9292
steps:
@@ -210,7 +210,7 @@ jobs:
210210
needs: [vars,release-draft,tag-release]
211211
permissions:
212212
id-token: write
213-
contents: write
213+
contents: write # Needed to update a github release
214214
steps:
215215
- name: Checkout Repository
216216
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

0 commit comments

Comments
 (0)