diff --git a/.github/workflows/test-security.yml b/.github/workflows/test-security.yml new file mode 100644 index 000000000..c96002d20 --- /dev/null +++ b/.github/workflows/test-security.yml @@ -0,0 +1,34 @@ +# Python 依存パッケージの脆弱性診断を定期的に行う +# NOTE: 公式 Action は API key 等を必要とするため利用しない(https://github.com/pyupio/safety-action/tree/main) + +name: test-security + +on: + schedule: + - cron: '00 04 15 * *' # 毎月15日 13:00 JST + +env: + PYTHON_VERSION: "3.11.3" + +defaults: + run: + shell: bash + +jobs: + test-security: + runs-on: ubuntu-20.04 + steps: + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: pip + + - name: Install Python dependencies + run: pip install -r requirements-dev.txt + + - name: Check Python dependency security + run: safety check -r requirements.txt -r requirements-dev.txt -r requirements-test.txt -r requirements-license.txt -o bare