mirror of
https://github.com/ivuorinen/gibidify.git
synced 2026-01-26 03:24:05 +00:00
fix(ci): update security.yml
This commit is contained in:
27
.github/workflows/security.yml
vendored
27
.github/workflows/security.yml
vendored
@@ -9,16 +9,18 @@ on:
|
|||||||
# Run security scan weekly on Sundays at 00:00 UTC
|
# Run security scan weekly on Sundays at 00:00 UTC
|
||||||
- cron: '0 0 * * 0'
|
- cron: '0 0 * * 0'
|
||||||
|
|
||||||
permissions:
|
permissions: read-all
|
||||||
security-events: write
|
|
||||||
contents: read
|
|
||||||
actions: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
security:
|
security:
|
||||||
name: Security Analysis
|
name: Security Analysis
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
security-events: write
|
||||||
|
contents: read
|
||||||
|
actions: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -26,7 +28,7 @@ jobs:
|
|||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.23'
|
go-version-file: 'go.mod'
|
||||||
|
|
||||||
- name: Cache Go modules
|
- name: Cache Go modules
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
@@ -40,7 +42,7 @@ jobs:
|
|||||||
|
|
||||||
# Security Scanning with gosec
|
# Security Scanning with gosec
|
||||||
- name: Run gosec Security Scanner
|
- name: Run gosec Security Scanner
|
||||||
uses: securecodewarrior/github-action-gosec@master
|
uses: securego/gosec@v2
|
||||||
with:
|
with:
|
||||||
args: '-fmt sarif -out gosec-results.sarif ./...'
|
args: '-fmt sarif -out gosec-results.sarif ./...'
|
||||||
|
|
||||||
@@ -69,16 +71,15 @@ jobs:
|
|||||||
|
|
||||||
# Additional Security Linting
|
# Additional Security Linting
|
||||||
- name: Run security-focused golangci-lint
|
- name: Run security-focused golangci-lint
|
||||||
run: |
|
uses: golangci/golangci-lint-action@v6.0.1
|
||||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
with:
|
||||||
golangci-lint run --enable=gosec,gocritic,bodyclose,rowserrcheck,misspell,unconvert,unparam,unused \
|
args: "--enable=gosec,gocritic,bodyclose,rowserrcheck,misspell,unconvert,unparam,unused --timeout=5m"
|
||||||
--timeout=5m
|
|
||||||
|
|
||||||
# Makefile Linting
|
# Makefile Linting
|
||||||
- name: Run checkmake on Makefile
|
- name: Run checkmake on Makefile
|
||||||
run: |
|
uses: Uno-Takashi/checkmake-action@v2
|
||||||
go install github.com/mrtazz/checkmake/cmd/checkmake@latest
|
with:
|
||||||
checkmake --config=.checkmake Makefile
|
config: .checkmake
|
||||||
|
|
||||||
# Shell Script Formatting Check
|
# Shell Script Formatting Check
|
||||||
- name: Check shell script formatting
|
- name: Check shell script formatting
|
||||||
|
|||||||
Reference in New Issue
Block a user