Skip to content

Commit 25d7e7e

Browse files
authored
A workflow to scan GitHub Actions Workflows (openvinotoolkit#27838)
### Details: This PR introduces a workflow with syntax checks for GitHub Actions Workflows. There's only `semgrep` scan for now, but more can be added later, if needed
1 parent 0626086 commit 25d7e7e

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/workflows_scans.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: GitHub Actions Workflows Scans
2+
on:
3+
workflow_dispatch: {}
4+
push:
5+
paths:
6+
- '.github/workflows/**'
7+
branches:
8+
- 'master'
9+
- 'releases/**'
10+
pull_request:
11+
paths:
12+
- '.github/workflows/**'
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
permissions: read-all
19+
20+
jobs:
21+
semgrep:
22+
name: github_actions_workflows_scan/semgrep
23+
runs-on: ubuntu-latest
24+
if: ${{ github.repository_owner == 'openvinotoolkit' }}
25+
26+
container:
27+
image: semgrep/semgrep
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
32+
with:
33+
submodules: 'false'
34+
sparse-checkout: .github/workflows
35+
36+
- name: Semgrep scan
37+
run: |
38+
semgrep scan --error -j 8 --config "p/github-actions" .github/workflows/*

0 commit comments

Comments
 (0)