fix: 修改workflow配置文件
This commit is contained in:
		
							
								
								
									
										52
									
								
								.github/workflows/detection.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										52
									
								
								.github/workflows/detection.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,52 +0,0 @@
 | 
			
		||||
name: Vulnerability and Backdoor Detection Workflow
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches: [main]
 | 
			
		||||
  pull_request:
 | 
			
		||||
    branches: [main]
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  # build:
 | 
			
		||||
  #   runs-on: ubuntu-latest
 | 
			
		||||
  #   steps:
 | 
			
		||||
  #     - uses: actions/checkout@v2
 | 
			
		||||
  #     - name: Install dependencies
 | 
			
		||||
  #       run: pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
 | 
			
		||||
  #     - name: Run tests
 | 
			
		||||
  #       run: python -m unittest discover -s tests
 | 
			
		||||
 | 
			
		||||
  security_check:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    # needs: build # 确保安全检查在构建后执行
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
        with:
 | 
			
		||||
          repository: "sangge/BackDoorBuster"
 | 
			
		||||
          ref: "feature/match"
 | 
			
		||||
          path: "BackDoorBuster"
 | 
			
		||||
      # - name: Install dependencies
 | 
			
		||||
      #   run: pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
 | 
			
		||||
      # - name: Run Backdoor and Vulnerability Detection
 | 
			
		||||
      #   uses: sangge/BackDoorBuster@feature/match # 使用BackDoorBuster仓库的根目录下的 action.yml
 | 
			
		||||
      #   with:
 | 
			
		||||
      #     code_path: "./tests"
 | 
			
		||||
      #     requirements_file: "./requirements.txt"
 | 
			
		||||
      #     output_format: "txt"
 | 
			
		||||
      # 需要新建一个仓库进行测试
 | 
			
		||||
      # - name: Clone custom Git repository
 | 
			
		||||
      #   run: |
 | 
			
		||||
      #     git clone -b feature/match https://git.mamahaha.work/sangge/BackDoorBuster
 | 
			
		||||
      #     cd BackDoorBuster/detection
 | 
			
		||||
 | 
			
		||||
      - name: Run Backdoor Detection
 | 
			
		||||
        run: python ${{ github.workspace }}/BackDoorBuster/detection/backdoor_detection.py ${{ github.workspace }}/BackDoorBuster/tests txt
 | 
			
		||||
 | 
			
		||||
      - name: Run Requirements Detection
 | 
			
		||||
        run: python ${{ github.workspace }}/BackDoorBuster/detection/requirements_detection.py ${{ github.workspace }}/BackDoorBuster/crawler/trans_extracted_data.txt ${{ github.workspace }}/BackDoorBuster/requirements.txt txt
 | 
			
		||||
 | 
			
		||||
      - name: Upload Result Artifacts
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        with:
 | 
			
		||||
          name: detection-results
 | 
			
		||||
          path: ./results/code/
 | 
			
		||||
							
								
								
									
										18
									
								
								.github/workflows/python-tests.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								.github/workflows/python-tests.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
name: Python application test
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches: [main]
 | 
			
		||||
  pull_request:
 | 
			
		||||
    branches: [main]
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build:
 | 
			
		||||
    runs-on: "ubuntu-latest"
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      - name: Install dependencies
 | 
			
		||||
        run: pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
 | 
			
		||||
      - name: Run tests
 | 
			
		||||
        run: python -m unittest discover -s tests
 | 
			
		||||
		Reference in New Issue
	
	Block a user