fix: send the Forgejo webhook secret inside the hook config #32
No reviewers
Labels
No labels
breaking
bug
ci
dependencies
documentation
feature
security
skip-changelog
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thierryade/backend!32
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/webhook-secret-in-config"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #31.
apps.specs.forgejo._hook_config: the hook config, with the secret (config["secret"]);ensure_webhookuses it — Forgejo ignores a top-level"secret", so every hook registered so far has none and all deliveries get a 403.resend_webhook_config(hook)+manage.py resend_forgejo_webhooks: PATCHes each registered hook's config (URL + its stored secret). To run once after deploying, to repair the three Filao hooks; harmless to run again. A failure on one repo is printed and the others go on.Test plan
manage.py test— 206 tests OK (the ensure_webhook test now checks the secret is insideconfig, 2 new for the command)autopep8 --diffclean,bandit0 issuespylint: my local tox env crashes in astroid onapps/specs/models.py(untouched here) — left to the CIdocker exec thierryade python manage.py resend_forgejo_webhooks, then a Forgejo test delivery should be accepted🤖 Generated with Claude Code
https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
📊 Rapports Argus pour cette PR