feat: 添加集成测试
This commit is contained in:
parent
b0a99cb4f7
commit
3f2f6070a8
35
action.yml
Normal file
35
action.yml
Normal file
@ -0,0 +1,35 @@
|
||||
name: "Backdoor Detection"
|
||||
description: "Perform backdoor and vulnerability detection on your code and dependencies."
|
||||
inputs:
|
||||
code_path:
|
||||
description: "Path to the code directory to be analyzed."
|
||||
required: true
|
||||
vulnerabilities_file:
|
||||
description: "Path to the vulnerabilities file for requirements detection."
|
||||
required: true
|
||||
requirements_file:
|
||||
description: "Path to the requirements.txt file."
|
||||
required: true
|
||||
output_format:
|
||||
description: "Output format for the detection results (html, md, txt)."
|
||||
required: true
|
||||
default: "txt"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.x"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install packaging
|
||||
- name: Run Backdoor Detection
|
||||
run: python ${{ github.workspace }}/detection/backdoor_detection.py ${{ inputs.code_path }} ${{ inputs.output_format }}
|
||||
shell: bash
|
||||
- name: Run Requirements Detection
|
||||
run: python ${{ github.workspace }}/detection/requirements_detection.py ${{ github.workspace }}/crawler/trans_extracted_data.txt ${{ inputs.requirements_file }} ${{ inputs.output_format }}
|
||||
shell: bash
|
Loading…
x
Reference in New Issue
Block a user