Files
BastienandGitHub ac387db978 🔒️(frontend) upgrade deps, add an ip allowlist for django admin, harden github actions
The Scalingo build script pins Caddy a second time, so both pins move
together. The checksums come from the official release checksum files.

DJANGO_ADMIN_IP_ALLOWLIST limits the Django admin URL to a CIDR
list; unset keeps the current open behavior. The client_ip matcher
reads X-Forwarded-For only from MESSAGES_FRONTEND_TRUSTED_PROXIES,
and trusted_proxies_strict takes the rightmost untrusted address, so
a spoofed or appended header never passes the filter. On Scalingo,
set the trusted proxies to private_ranges; the router IP ranges are
not published.

make test-front-distroless builds the production image and smoke-tests
it: heartbeat, lprobe healthcheck, allow/deny cases, spoofed headers,
and the trusted-proxy path. The CI runs it; the published image had no
test before. The script picks bridge or host network mode from the
daemon, so it also runs on Docker Desktop.

A moving major tag can change after a compromise of the action
repository. Each pin keeps the version as a comment. The pins also
upgrade every action to its latest major: the new majors only move the
runtime to node24 and remove inputs these workflows do not use.
crowdin v3 changes only custom CLI args, which we do not pass.

Set persist-credentials: false on every checkout step, so the job
token does not stay in .git/config for later steps. Remove the unused
GITHUB_TOKEN from the crowdin upload workflow: the action reads it
only in the push and pull-request paths, and this workflow disables
both. Restrict the crowdin workflow permissions to contents: read.
2026-09-06 20:50:32 +02:00

45 lines
1.3 KiB
YAML

name: Update crowdin sources
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: read
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
env:
DJANGO_CONFIGURATION: Build
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install frontend dependencies
run: make install-frozen-front
- name: Generate frontend source translations
run: make i18n-generate
- name: crowdin action
uses: crowdin/github-action@0d5670f539973aea2f01abce61a8989934df0025 # v3.0.2
with:
config: crowdin/config.yml
upload_sources: true
upload_translations: true
# Upload french translations only as we want to translate this language during dev
upload_language: fr
download_translations: false
create_pull_request: false
env:
# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
# Visit https://crowdin.com/settings#api-key to create this token
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
CROWDIN_BASE_PATH: "../src/"