Skip to content

Commit

Permalink
追加: 定期脆弱性診断を導入 (#1152)
Browse files Browse the repository at this point in the history
* add: 定期脆弱性診断を導入

* 追加: 設計意図を追記

* fix: audit を test security で言い換え

* fix: `safety` CI のバージョンを管理
  • Loading branch information
tarepan authored Apr 30, 2024
1 parent aed745d commit d897bda
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test-security.yml
Original file line number Diff line number Diff line change
@@ -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: <Setup> Check out the repository
uses: actions/checkout@v4

- name: <Setup> Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: pip

- name: <Setup> Install Python dependencies
run: pip install -r requirements-dev.txt

- name: <Test> Check Python dependency security
run: safety check -r requirements.txt -r requirements-dev.txt -r requirements-test.txt -r requirements-license.txt -o bare

0 comments on commit d897bda

Please sign in to comment.