Enhances the ship with security and automation!
Some checks failed
Bandit / bandit (push) Has been cancelled
Codacy Security Scan / Codacy Security Scan (push) Has been cancelled

Adds Dependabot for automatic dependency updates to keep the vessel sea-worthy and updates pre-commit hooks.

Integrates Bandit and Codacy for automated security scans, ensuring a well-defended treasure hold.

Updates devcontainer settings for smoother sailing in the development environment.

Now use foreman for development, to be able to run all processes in development.

Let's keep this ship safe and sound, savvy?
This commit is contained in:
2025-05-18 22:04:15 +00:00
parent f0ae061fa7
commit 3a99b9a339
6 changed files with 152 additions and 43 deletions

View File

@ -1,8 +1,15 @@
default_install_hook_types:
- pre-commit
- post-checkout
- post-merge
- post-rewrite
# default_install_hook_types:
# - pre-commit
# - post-checkout
# - post-merge
# - post-rewrite
ci:
skip: [django-check, django-check-migrations]
default_language_version:
node: 22.15.1
python: python3.13
repos:
- repo: https://github.com/adamchainz/django-upgrade
@ -34,28 +41,16 @@ repos:
- id: mixed-line-ending
args: [--fix=lf]
# - repo: https://github.com/psf/black
# rev: 22.10.0
# hooks:
# - id: black
# # HTML/Django template linting
# - repo: https://github.com/rtts/djhtml
# rev: 3.0.7
# hooks:
# - id: djhtml
# entry: djhtml --tabwidth 4
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
- repo: local
hooks:
- id: prettier
name: prettier
language: node
types_or: [javascript, jsx, ts, tsx, css, scss, html, json, yaml, markdown]
additional_dependencies:
- prettier
- prettier-plugin-jinja-template
# types_or: [javascript, jsx, ts, tsx, css, scss, json, yaml, markdown]
# exclude: '.*\.html$'
entry: npx prettier --write --ignore-unknown --config .prettierrc --plugin prettier-plugin-jinja-template
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.18.1
@ -77,17 +72,19 @@ repos:
- id: django-check
name: Django Check
entry: uv run python dashboard_project/manage.py check
language: system
language: python
pass_filenames: false
types: [python]
always_run: true
additional_dependencies: [uv]
- id: django-check-migrations
name: Django Check Migrations
entry: uv run python dashboard_project/manage.py makemigrations --check --dry-run
language: system
language: python
pass_filenames: false
types: [python]
additional_dependencies: [uv]
# Security checks
- repo: https://github.com/pycqa/bandit
@ -95,7 +92,7 @@ repos:
hooks:
- id: bandit
args: [-c, pyproject.toml, -r, dashboard_project]
additional_dependencies: ["bandit[toml]"]
# additional_dependencies: ["bandit[toml]"]
# # Type checking
# - repo: https://github.com/pre-commit/mirrors-mypy