Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0dd57faf52
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| security: { | ||
| csp: { | ||
| directives: ["default-src 'self'"], | ||
| }, |
There was a problem hiding this comment.
Switch Markdown highlighting before turning on CSP
Enabling security.csp here introduces a user-visible regression for code blocks because this repo still uses Astro’s default Markdown highlighter (Shiki) and Astro 6 explicitly notes Shiki is incompatible with CSP due to inline styles. Since no markdown.syntaxHighlight override is configured, pages with fenced code blocks (for example src/content/blog/markdown-style-guide.md) can lose syntax-highlighting styles under this policy unless highlighting is migrated (e.g., to Prism) or CSP handling is adjusted.
Useful? React with 👍 / 👎.
This pull request adds a Content Security Policy (CSP) configuration to the Astro site settings to improve site security per Astro v6.0 (see docs).
Security enhancements:
security.cspconfiguration with a directive of["default-src 'self'"]inastro.config.mjsto restrict resource loading to the same origin.