From 3f2f6070a8dd6e70829c54b08269464381d20c53 Mon Sep 17 00:00:00 2001 From: dqy <1016751306@qq.com> Date: Wed, 24 Apr 2024 17:13:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=9B=86=E6=88=90?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..38160ce --- /dev/null +++ b/action.yml @@ -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