Skip to content

Appflow flow status #43571

Appflow flow status

Appflow flow status #43571

Workflow file for this run

# Copyright IBM Corp. 2014, 2026
# "SPDX-License-Identifier: MPL-2.0"
name: Semgrep Checks
on:
push:
branches:
- main
- 'release/**'
pull_request:
paths:
- internal/**
- .semgrep*yml
- .ci/semgrep*
- .github/workflows/semgrep-ci.yml
## NOTE: !!!
## When changing these workflows, ensure that the following is updated:
## - Documentation: docs/continuous-integration.md
## - Documentation: docs/makefile-cheat-sheet.md
## - Makefile: ./GNUmakefile
env:
SEMGREP_SEND_METRICS: "off"
SEMGREP_ENABLE_VERSION_CHECK: false
SEMGREP_TIMEOUT: 300
SEMGREP_ARGS: --error --quiet
jobs:
semgrep-validate:
name: Validate Code Quality Rules
runs-on: ubuntu-latest
container:
image: "semgrep/semgrep:1.154.0"
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- run: |
semgrep --validate \
--config .ci/.semgrep.yml \
--config .ci/.semgrep-constants.yml \
--config .ci/.semgrep-test-constants.yml \
--config .ci/semgrep/
semgrep-test:
name: Semgrep Rule Tests
needs: [semgrep-validate]
runs-on: ubuntu-latest
container:
image: "semgrep/semgrep:1.154.0"
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- run: |
semgrep --quiet --test .ci/semgrep/
semgrep --quiet --test --config .ci/semgrep-caps-aws-ec2.yml .ci/semgrep-caps-aws-ec2.go
semgrep:
name: Code Quality Scan (make semgrep-code-quality)
needs: [semgrep-test]
runs-on: ubuntu-latest
container:
image: "semgrep/semgrep:1.154.0"
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- run: |
semgrep $SEMGREP_ARGS \
--config .ci/.semgrep.yml \
--config .ci/.semgrep-constants.yml \
--config .ci/.semgrep-test-constants.yml \
--config .ci/semgrep/ \
--config 'r/dgryski.semgrep-go.anon-struct-args' \
--config 'r/dgryski.semgrep-go.badnilguard' \
--config 'r/dgryski.semgrep-go.contextcancelable' \
--config 'r/dgryski.semgrep-go.ctx-time' \
--config 'r/dgryski.semgrep-go.errnilcheck' \
--config 'r/dgryski.semgrep-go.ioutil' \
--config 'r/dgryski.semgrep-go.mail-address' \
--config 'r/dgryski.semgrep-go.marshaljson' \
--config 'r/dgryski.semgrep-go.nilerr' \
--config 'r/dgryski.semgrep-go.oddcompare' \
--config 'r/dgryski.semgrep-go.oddifsequence' \
--config 'r/dgryski.semgrep-go.oserrors' \
--config 'r/dgryski.semgrep-go.parseint-downcast' \
--config 'r/dgryski.semgrep-go.readeof' \
--config 'r/dgryski.semgrep-go.readfull' \
--config 'r/dgryski.semgrep-go.sprinterr' \
--config 'r/dgryski.semgrep-go.unixnano' \
--config 'r/dgryski.semgrep-go.writestring' \
--config 'r/dgryski.semgrep-go.wrongerrcall'
naming_cae:
name: Naming Scan Caps/AWS/EC2 (make semgrep-naming-cae)
runs-on: ubuntu-latest
container:
image: "semgrep/semgrep:1.154.0"
if: (github.action != 'dependabot[bot]')
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- run: semgrep --validate --config .ci/semgrep-caps-aws-ec2.yml
- run: semgrep $SEMGREP_ARGS --config .ci/semgrep-caps-aws-ec2.yml
naming_tests:
name: Test Configs Scan (make semgrep-naming)
runs-on: ubuntu-latest
container:
image: "semgrep/semgrep:1.154.0"
if: (github.action != 'dependabot[bot]')
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- run: semgrep --validate --config .ci/.semgrep-configs.yml
- run: semgrep $SEMGREP_ARGS --config .ci/.semgrep-configs.yml
naming_semgrep0:
name: Service Name Scan A-C (make semgrep-service-naming)
runs-on: ubuntu-latest
container:
image: "semgrep/semgrep:1.154.0"
if: (github.action != 'dependabot[bot]')
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- run: semgrep --validate --config .ci/.semgrep-service-name0.yml
- run: semgrep $SEMGREP_ARGS --config .ci/.semgrep-service-name0.yml
naming_semgrep1:
name: Service Name Scan C-I (make semgrep-service-naming)
runs-on: ubuntu-latest
container:
image: "semgrep/semgrep:1.154.0"
if: (github.action != 'dependabot[bot]')
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- run: semgrep --validate --config .ci/.semgrep-service-name1.yml
- run: semgrep $SEMGREP_ARGS --config .ci/.semgrep-service-name1.yml
naming_semgrep2:
name: Service Name Scan I-Q (make semgrep-service-naming)
runs-on: ubuntu-latest
container:
image: "semgrep/semgrep:1.154.0"
if: (github.action != 'dependabot[bot]')
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- run: semgrep --validate --config .ci/.semgrep-service-name2.yml
- run: semgrep $SEMGREP_ARGS --config .ci/.semgrep-service-name2.yml
naming_semgrep3:
name: Service Name Scan Q-Z (make semgrep-service-naming)
runs-on: ubuntu-latest
container:
image: "semgrep/semgrep:1.154.0"
if: (github.action != 'dependabot[bot]')
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- run: semgrep --validate --config .ci/.semgrep-service-name3.yml
- run: semgrep $SEMGREP_ARGS --config .ci/.semgrep-service-name3.yml