Repository navigation
56 lines (45 loc) · 1.49 KB
/
Copy pathsecurity.yml
File metadata and controls
56 lines (45 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Security
on:
push:
branches: [main]
pull_request:
# New advisories are published without any change in this repository,
# so re-check the dependencies weekly as well (Mondays, 06:00 UTC).
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:
permissions:
contents: read
# CodeQL is not run here: the repository uses CodeQL default setup
# (Settings -> Code security), and GitHub rejects results from a workflow
# while default setup is enabled.
jobs:
# Known vulnerabilities in the runtime dependencies that users install
# with the package. pip-audit resolves them from pyproject.toml in an
# isolated environment, so the result matches a fresh `pip install`.
dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install pip-audit
run: python -m pip install pip-audit
- name: Audit runtime dependencies
run: pip-audit .
# Static analysis of the SDK source for insecure patterns, such as disabled
# TLS verification, requests without timeouts, or eval/exec.
bandit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install bandit
run: python -m pip install bandit
- name: Scan package source
run: bandit -r captcha_solver_api