diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index fde5088..df73d3d 100644 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +export UV_LINK_MODE=copy; + sudo apt update sudo apt full-upgrade -y sudo apt autoremove -y; @@ -72,6 +74,7 @@ fi if [ -f ~/.cache/oh-my-posh-completion.bash ]; then source ~/.cache/oh-my-posh-completion.bash fi + export UV_LINK_MODE=copy; EOF diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a61b9b9..46b132a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,17 +6,17 @@ version: 2 updates: - - package-ecosystem: devcontainers - directory: / + - package-ecosystem: "devcontainers" + directory: "/" schedule: - interval: weekly - day: tuesday - time: 03:00 - timezone: Europe/Amsterdam - - package-ecosystem: uv - directory: / + interval: "weekly" + day: "tuesday" + time: "03:00" + timezone: "Europe/Amsterdam" + - package-ecosystem: "uv" + directory: "/" schedule: - interval: weekly - day: tuesday - time: 03:00 - timezone: Europe/Amsterdam + interval: "weekly" + day: "tuesday" + time: "03:00" + timezone: "Europe/Amsterdam" diff --git a/.github/workflows/bandit.yml b/.github/workflows/bandit.yml new file mode 100644 index 0000000..9f57ba9 --- /dev/null +++ b/.github/workflows/bandit.yml @@ -0,0 +1,51 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# Bandit is a security linter designed to find common security issues in Python code. +# This action will run Bandit on your codebase. +# The results of the scan will be found under the Security tab of your repository. + +# https://github.com/marketplace/actions/bandit-scan is ISC licensed, by abirismyname +# https://pypi.org/project/bandit/ is Apache v2.0 licensed, by PyCQA + +name: Bandit +on: + push: + branches: ["master"] + pull_request: + # The branches below must be a subset of the branches above + branches: ["master"] + schedule: + - cron: "37 3 * * 3" + +jobs: + bandit: + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Bandit Scan + uses: shundor/python-bandit-scan@ab1d87dfccc5a0ffab88be3aaac6ffe35c10d6cd + with: # optional arguments + # exit with 0, even with results found + exit_zero: true # optional, default is DEFAULT + # Github token of the repository (automatically created by Github) + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information. + # File or directory to run bandit on + # path: # optional, default is . + # Report only issues of a given severity level or higher. Can be LOW, MEDIUM or HIGH. Default is UNDEFINED (everything) + # level: # optional, default is UNDEFINED + # Report only issues of a given confidence level or higher. Can be LOW, MEDIUM or HIGH. Default is UNDEFINED (everything) + # confidence: # optional, default is UNDEFINED + # comma-separated list of paths (glob patterns supported) to exclude from scan (note that these are in addition to the excluded paths provided in the config file) (default: .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg) + # excluded_paths: # optional, default is DEFAULT + # comma-separated list of test IDs to skip + # skips: # optional, default is DEFAULT + # path to a .bandit file that supplies command line arguments + # ini_path: # optional, default is DEFAULT diff --git a/.github/workflows/codacy.yml b/.github/workflows/codacy.yml new file mode 100644 index 0000000..cc9a04f --- /dev/null +++ b/.github/workflows/codacy.yml @@ -0,0 +1,61 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# This workflow checks out code, performs a Codacy security scan +# and integrates the results with the +# GitHub Advanced Security code scanning feature. For more information on +# the Codacy security scan action usage and parameters, see +# https://github.com/codacy/codacy-analysis-cli-action. +# For more information on Codacy Analysis CLI in general, see +# https://github.com/codacy/codacy-analysis-cli. + +name: Codacy Security Scan + +on: + push: + branches: ["master"] + pull_request: + # The branches below must be a subset of the branches above + branches: ["master"] + schedule: + - cron: "36 10 * * 3" + +permissions: + contents: read + +jobs: + codacy-security-scan: + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + name: Codacy Security Scan + runs-on: ubuntu-latest + steps: + # Checkout the repository to the GitHub Actions runner + - name: Checkout code + uses: actions/checkout@v4 + + # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis + - name: Run Codacy Analysis CLI + uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b + with: + # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository + # You can also omit the token and run the tools that support default configurations + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + verbose: true + output: results.sarif + format: sarif + # Adjust severity of non-security issues + gh-code-scanning-compat: true + # Force 0 exit code to allow SARIF file generation + # This will handover control about PR rejection to the GitHub side + max-allowed-issues: 2147483647 + + # Upload the SARIF file generated in the previous step + - name: Upload SARIF results file + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: results.sarif diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 131e73d..e8e85d5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,8 +1,11 @@ -default_install_hook_types: - - pre-commit - - post-checkout - - post-merge - - post-rewrite +# default_install_hook_types: +# - pre-commit +# - post-checkout +# - post-merge +# - post-rewrite + +default_language_version: + node: 22.15.1 repos: - repo: https://github.com/adamchainz/django-upgrade diff --git a/Makefile b/Makefile index 8b6f760..d5e4256 100644 --- a/Makefile +++ b/Makefile @@ -104,10 +104,10 @@ run-redis: # Start all development services (web, redis, celery, celery-beat) run-all: - make run-redis & \ - make run & \ - make celery & \ - make celery-beat + foreman start + +procfile: + foreman start # Test Celery task test-celery: @@ -122,6 +122,3 @@ init-data-integration: # Setup development environment setup-dev: venv install-dev migrate create_default_datasource @echo "Development environment setup complete" - -procfile: - foreman start