Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go-pr-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: "Go PR Analysis"

# Reusable workflow for Go PR analysis in monorepos
Expand Down Expand Up @@ -109,7 +109,7 @@
- name: Get changed files
id: changed
shell: bash
run: |

Check failure on line 112 in .github/workflows/go-pr-analysis.yml

View workflow job for this annotation

GitHub Actions / Action Lint

shellcheck reported issue in this script: SC2181:style:9:9: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?

Check failure on line 112 in .github/workflows/go-pr-analysis.yml

View workflow job for this annotation

GitHub Actions / Action Lint

shellcheck reported issue in this script: SC2086:info:10:34: Double quote to prevent globbing and word splitting
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
# For PRs, compare base and head
BASE_SHA="${{ github.event.pull_request.base.sha }}"
Expand Down Expand Up @@ -248,14 +248,14 @@
GOPRIVATE: ${{ inputs.go_private_modules }}

- name: Install golangci-lint
run: |

Check failure on line 251 in .github/workflows/go-pr-analysis.yml

View workflow job for this annotation

GitHub Actions / Action Lint

shellcheck reported issue in this script: SC2086:info:2:32: Double quote to prevent globbing and word splitting

Check failure on line 251 in .github/workflows/go-pr-analysis.yml

View workflow job for this annotation

GitHub Actions / Action Lint

shellcheck reported issue in this script: SC2046:warning:1:101: Quote this to prevent word splitting
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${{ inputs.golangci_lint_version }}
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH

- name: Detect Makefile lint target
id: detect-make
working-directory: ${{ matrix.app.working_dir }}
run: |

Check failure on line 258 in .github/workflows/go-pr-analysis.yml

View workflow job for this annotation

GitHub Actions / Action Lint

shellcheck reported issue in this script: SC2086:info:7:30: Double quote to prevent globbing and word splitting

Check failure on line 258 in .github/workflows/go-pr-analysis.yml

View workflow job for this annotation

GitHub Actions / Action Lint

shellcheck reported issue in this script: SC2086:info:4:29: Double quote to prevent globbing and word splitting

Check failure on line 258 in .github/workflows/go-pr-analysis.yml

View workflow job for this annotation

GitHub Actions / Action Lint

shellcheck reported issue in this script: SC2086:info:11:28: Double quote to prevent globbing and word splitting
if [[ -f "Makefile" ]] || [[ -f "makefile" ]] || [[ -f "GNUmakefile" ]]; then
if make -n lint >/dev/null 2>&1; then
echo "Makefile with 'lint' target detected"
Expand Down Expand Up @@ -311,7 +311,7 @@
- name: Detect Makefile sec target
id: detect-make
working-directory: ${{ matrix.app.working_dir }}
run: |

Check failure on line 314 in .github/workflows/go-pr-analysis.yml

View workflow job for this annotation

GitHub Actions / Action Lint

shellcheck reported issue in this script: SC2086:info:7:30: Double quote to prevent globbing and word splitting

Check failure on line 314 in .github/workflows/go-pr-analysis.yml

View workflow job for this annotation

GitHub Actions / Action Lint

shellcheck reported issue in this script: SC2086:info:4:29: Double quote to prevent globbing and word splitting

Check failure on line 314 in .github/workflows/go-pr-analysis.yml

View workflow job for this annotation

GitHub Actions / Action Lint

shellcheck reported issue in this script: SC2086:info:11:28: Double quote to prevent globbing and word splitting
if [[ -f "Makefile" ]] || [[ -f "makefile" ]] || [[ -f "GNUmakefile" ]]; then
if make -n sec >/dev/null 2>&1; then
echo "Makefile with 'sec' target detected"
Expand All @@ -333,7 +333,7 @@

- name: Run Gosec for SARIF
id: gosec-sarif
uses: securego/gosec@v2.24.7
uses: securego/gosec@v2.25.0
with:
args: -no-fail -fmt sarif -out gosec-${{ matrix.app.name }}.sarif ./${{ matrix.app.working_dir }}/...

Expand Down
Loading