Skip to content

Commit

Permalink
add dangerous cmd check (#955)
Browse files Browse the repository at this point in the history
* add dangerous cmd check

Signed-off-by: Wenxin Zhang <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* clean code

Signed-off-by: Wenxin Zhang <[email protected]>

---------

Signed-off-by: Wenxin Zhang <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
VincyZhang and pre-commit-ci[bot] authored Dec 3, 2024
1 parent 0772494 commit 766c757
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/_get-test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ jobs:
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0

- name: Check Dangerous Command Injection
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: opea-project/validation/actions/check-cmd@main
with:
work_dir: ${{ github.workspace }}

- name: Get test matrix
id: get-test-matrix
run: |
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/mix-code-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ jobs:
- name: Checkout out Repo
uses: actions/checkout@v4

- name: Check Dangerous Command Injection
uses: opea-project/validation/actions/check-cmd@main
with:
work_dir: ${{ github.workspace }}

- name: Docker Build
run: |
docker build -f ${{ github.workspace }}/.github/workflows/docker/${{ env.DOCKER_FILE_NAME }}.dockerfile -t ${{ env.REPO_NAME }}:${{ env.REPO_TAG }} .
Expand Down

0 comments on commit 766c757

Please sign in to comment.