Repository navigation
Skills: security headers, the nonce of templates and CORS - #642
Merged
Merged
Conversation
The skill deploy has the plugin SecurityHeaders in its application, a section on HSTS, the rollout of a CSP from its reports, the nonce and Permissions-Policy, and their mistakes; templates the nonce of the inline scripts and styles; api the plugin CORS in place of a hook of *. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Tests
|
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #634, its last step, stacked on #641.
Changes
pyjoyment:deploy:plugin('SecurityHeaders', csp_report_only=..., reports='/csp-reports'), so a coding agent sets the security headers in every deployment.-pbehind a proxy, start with a shortmax_age,include_subdomainsandpreloadlater), the rollout of a CSP fromcsp_report_onlyand its reports tocsp, the nonce and a CDN,Permissions-Policy, and CORS in the skillapi.-p; an enforced CSP before its reports are read;'unsafe-inline'next to a nonce;styleandonclickattributes.pyjoyment:templates: inline scripts and styles go through thejavascript/stylesheetblocks ornonce="<%= csp_nonce() %>", andstyle/onclickattributes move into the stylesheet and the script. The description and the links include it.pyjoyment:api:plugin('CORS')replaces the hook that setAccess-Control-Allow-Origin: *, and the hook moved into Mistakes: set by hand, it misses the preflight requests andVary: Origin. New entries cover origins with credentials andAllowedHosts.Validation
t/docs/skills_deploy.py: the headers of the application of the skill, its report route, and every option that the section names is an option of the plugint/docs/skills_api.py:Access-Control-Allow-Originfor a request withOrigin, and the preflight ofDELETEt/docs/skills_templates.py: the three forms of the skill give every inline script and style the nonce of the policyt/docs/skills.py, all oft/docsclaude plugin validate ./plugins/pyjoymentandclaude plugin validate .: only the existing warning that the plugin has no version, which is intendedtrunk check: no issues🤖 Generated with Claude Code