-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjustfile
More file actions
46 lines (34 loc) · 1.48 KB
/
Copy pathjustfile
File metadata and controls
46 lines (34 loc) · 1.48 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
# avoid squashing failures in pipes
set shell := ["zsh", "-uc", "-o", "pipefail"]
makemigrations:
DJANGO_SETTINGS_MODULE=project.settings.development ./project/manage.py makemigrations
migrate:
DJANGO_SETTINGS_MODULE=project.settings.development ./project/manage.py migrate
test:
DJANGO_SETTINGS_MODULE=project.settings.test uv run pytest | tee /tmp/blueflow-test-$(date +'%Y%m%d%H%M')
run:
DJANGO_SETTINGS_MODULE=project.settings.development ./project/manage.py runserver
up:
docker-compose up
build:
docker build --target develop .
build-prod:
docker build --target prod .
install:
uv sync --all-extras
api-docs:
DJANGO_SETTINGS_MODULE=project.settings.development ./project/manage.py spectacular --validate
security-check:
uv run bandit --configfile pyproject.toml --severity-level high --confidence-level medium -f json --output /tmp/report.json --recursive blueflow
security-report:
uv run bandit --configfile pyproject.toml --exit-zero --severity-level high --confidence-level medium -f json --output /tmp/report.json --recursive blueflow
uv run python -c 'import json; totals = json.loads(open("/tmp/report.json").read())["metrics"]["_totals"]; print(json.dumps(totals, indent=2, sort_keys=True))' > bandit.json
diff-security:
uv run python -c '\
import json;\
import sys;\
new = json.load(open("/tmp/report.json"))["metrics"]["_totals"];\
historic = json.load(open("bandit.json"));\
del new["loc"];\
del historic["loc"];\
sys.exit(int(historic != new))'