mirror of
https://github.com/cloudflare/cloudflared.git
synced 2026-08-07 07:14:57 +00:00
ci: add Semgrep OSS scanning workflow
## Summary Port from https://github.com/cloudflare/cloudflared/pull/1639 to GitLab
This commit is contained in:
@@ -1,24 +1,30 @@
|
|||||||
|
name: Semgrep OSS scan
|
||||||
on:
|
on:
|
||||||
pull_request: {}
|
pull_request: {}
|
||||||
|
push:
|
||||||
|
branches: [main, master]
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 25 * *'
|
||||||
name: Semgrep config
|
concurrency:
|
||||||
|
group: semgrep-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
jobs:
|
jobs:
|
||||||
semgrep:
|
semgrep:
|
||||||
name: semgrep/ci
|
name: semgrep-oss
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-slim
|
||||||
env:
|
|
||||||
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
|
|
||||||
SEMGREP_URL: https://cloudflare.semgrep.dev
|
|
||||||
SEMGREP_APP_URL: https://cloudflare.semgrep.dev
|
|
||||||
SEMGREP_VERSION_CHECK_URL: https://cloudflare.semgrep.dev/api/check-version
|
|
||||||
container:
|
|
||||||
image: semgrep/semgrep
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- run: semgrep ci
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
- id: cache-semgrep
|
||||||
|
uses: actions/cache@v5
|
||||||
|
with:
|
||||||
|
path: ~/.local
|
||||||
|
key: semgrep-1.160.0-${{ runner.os }}
|
||||||
|
- if: steps.cache-semgrep.outputs.cache-hit != 'true'
|
||||||
|
run: pip install --user semgrep==1.160.0
|
||||||
|
- run: echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||||
|
- run: semgrep scan --config=auto
|
||||||
|
|||||||
Reference in New Issue
Block a user