Apply final-review cleanup: robots sitemap, CI guards, header parity
- Remove Sitemap line from robots.txt (no @astrojs/sitemap installed; was pointing to a 404 that would trip Google Search Console). - Align Permissions-Policy across all three enforcement layers (middleware, .htaccess, Cloudflare Transform Rule in OPERATOR-CHECKLIST) by dropping the stray fullscreen=(self) from the middleware. - Bump Lighthouse CI numberOfRuns from 1 to 3 to dampen CI-runner noise. - Add CI guard that fails the build if any <TBD:...> marker survives into dist/ — prevents a legally incomplete imprint from shipping by accident. - Add SFTP_* secret null-guard before the rsync --delete step so a missing secret fails loudly instead of targeting the SSH user's home root. - Document the set:html compile-time-constant invariant in DualValueProps. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,14 @@ jobs:
|
|||||||
- name: Build site
|
- name: Build site
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Guard — no TBD markers may ship in built HTML
|
||||||
|
run: |
|
||||||
|
if grep -rl 'TBD:' dist 2>/dev/null | grep -E '\.(html|svg)$'; then
|
||||||
|
echo "Built output contains unfilled <TBD:...> markers."
|
||||||
|
echo "Fill in imprint.astro and privacy.astro operator fields before merging to main."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Validate HTML
|
- name: Validate HTML
|
||||||
run: npm run lint:html
|
run: npm run lint:html
|
||||||
|
|
||||||
@@ -80,6 +88,11 @@ jobs:
|
|||||||
SFTP_HOST: ${{ secrets.SFTP_HOST }}
|
SFTP_HOST: ${{ secrets.SFTP_HOST }}
|
||||||
SFTP_PATH: ${{ secrets.SFTP_PATH }}
|
SFTP_PATH: ${{ secrets.SFTP_PATH }}
|
||||||
run: |
|
run: |
|
||||||
|
# Fail loudly if any secret is missing — otherwise rsync --delete
|
||||||
|
# could be directed at the SSH user's home root.
|
||||||
|
: "${SFTP_USER:?SFTP_USER secret must be set}"
|
||||||
|
: "${SFTP_HOST:?SFTP_HOST secret must be set}"
|
||||||
|
: "${SFTP_PATH:?SFTP_PATH secret must be set}"
|
||||||
rsync -avz --delete \
|
rsync -avz --delete \
|
||||||
-e "ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=~/.ssh/known_hosts" \
|
-e "ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=~/.ssh/known_hosts" \
|
||||||
dist/ "$SFTP_USER@$SFTP_HOST:$SFTP_PATH/"
|
dist/ "$SFTP_USER@$SFTP_HOST:$SFTP_PATH/"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ module.exports = {
|
|||||||
'http://localhost/imprint/index.html',
|
'http://localhost/imprint/index.html',
|
||||||
'http://localhost/privacy/index.html',
|
'http://localhost/privacy/index.html',
|
||||||
],
|
],
|
||||||
numberOfRuns: 1,
|
numberOfRuns: 3,
|
||||||
settings: {
|
settings: {
|
||||||
preset: 'desktop',
|
preset: 'desktop',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
User-agent: *
|
User-agent: *
|
||||||
Allow: /
|
Allow: /
|
||||||
|
|
||||||
Sitemap: https://www.cameleer.io/sitemap-index.xml
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ interface Tile {
|
|||||||
capability: string;
|
capability: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// tile.capability is a compile-time constant defined below — never feed
|
||||||
|
// user-supplied or CMS content into set:html further down (XSS risk).
|
||||||
const tiles: Tile[] = [
|
const tiles: Tile[] = [
|
||||||
{
|
{
|
||||||
outcome: 'Cut debugging time in half.',
|
outcome: 'Cut debugging time in half.',
|
||||||
|
|||||||
@@ -26,13 +26,13 @@ export function buildSecurityHeaders(): Record<string, string> {
|
|||||||
"object-src 'none'",
|
"object-src 'none'",
|
||||||
].join('; ');
|
].join('; ');
|
||||||
|
|
||||||
|
// Must match .htaccess and the Cloudflare Transform Rule in OPERATOR-CHECKLIST.md.
|
||||||
const permissionsPolicy = [
|
const permissionsPolicy = [
|
||||||
'geolocation=()',
|
'geolocation=()',
|
||||||
'microphone=()',
|
'microphone=()',
|
||||||
'camera=()',
|
'camera=()',
|
||||||
'payment=()',
|
'payment=()',
|
||||||
'usb=()',
|
'usb=()',
|
||||||
'fullscreen=(self)',
|
|
||||||
].join(', ');
|
].join(', ');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user