Skip to content

Commit 736155c

Browse files
authored
Detect dangerous command (#1179)
Signed-off-by: Wenxin Zhang <wenxin.zhang@intel.com>
1 parent 39fa25e commit 736155c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/workflows/_get-test-matrix.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ jobs:
4242
ref: ${{ env.CHECKOUT_REF }}
4343
fetch-depth: 0
4444

45+
- name: Check Dangerous Command Injection
46+
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
47+
uses: opea-project/validation/actions/check-cmd@main
48+
with:
49+
work_dir: ${{ github.workspace }}
50+
4551
- name: Get test matrix
4652
id: get-test-matrix
4753
run: |

.github/workflows/pr-code-scan.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
- name: Checkout out Repo
3535
uses: actions/checkout@v4
3636

37+
- name: Check Dangerous Command Injection
38+
uses: opea-project/validation/actions/check-cmd@main
39+
with:
40+
work_dir: ${{ github.workspace }}
41+
3742
- name: Docker Build
3843
run: |
3944
docker build -f ${{ github.workspace }}/.github/workflows/docker/${{ env.DOCKER_FILE_NAME }}.dockerfile -t ${{ env.REPO_NAME }}:${{ env.REPO_TAG }} .

0 commit comments

Comments
 (0)