-
Notifications
You must be signed in to change notification settings - Fork 0
Add privacy policy #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
| import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"; | ||
| --- | ||
|
|
||
| <StarlightPage | ||
| frontmatter={{ | ||
| title: "Privacy Policy", | ||
| description: "Fiberplane Privacy Policy", | ||
| template: "splash" | ||
| }} | ||
| > | ||
| <!-- @ts-expect-error Termly won't render without ¯\_(ツ)_/¯ --> | ||
| <div name="termly-embed" data-id="a410debf-2132-4f59-9a6e-9de1f47295ff"></div> | ||
|
|
||
| <script> | ||
| (function (d, s, id) { | ||
| var js, | ||
| tjs = d.getElementsByTagName(s)[0]; | ||
| if (d.getElementById(id)) return; | ||
| js = d.createElement(s); | ||
|
|
||
| if (js instanceof HTMLScriptElement && tjs.parentNode) { | ||
| js.id = id; | ||
| js.src = "https://app.termly.io/embed-policy.min.js"; | ||
| tjs.parentNode.insertBefore(js, tjs); | ||
| } | ||
| })(document, "script", "termly-jssdk"); | ||
| </script> | ||
|
Comment on lines
+15
to
+28
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainAdd Subresource Integrity (SRI) for external script. Loading the Termly SDK without Subresource Integrity verification creates a security risk. If the external domain is compromised, malicious code could be injected into your privacy policy page. Consider adding SRI attributes. First, check Termly's documentation for their recommended implementation: If SRI is not available from Termly, consider these alternatives:
Additionally, verify your site's CSP allows scripts from 🏁 Script executed: #!/bin/bash
# Description: Check for Content Security Policy configuration
echo "Searching for CSP configuration..."
rg -n "Content-Security-Policy" -A 5
rg -n "script-src" -A 3Length of output: 34 🌐 Web query: 💡 Result: Short answer: No — Termly’s documentation and embed snippets do not provide a Subresource Integrity (integrity) hash for embed-policy.min.js. Their examples use a plain src to https://app.termly.io/embed-policy.min.js (or newer app.termly.io resource URLs) without an integrity attribute. [1][2] If you need SRI, you can fetch the file yourself, compute the SHA256/384/512 hash, and add an integrity attribute — but note that Termly may update that hosted file (breaking the hash) unless you self-host a stable copy. [1][2] Sources:
I need to check for CSP configuration at the deployment/build level, as it may not be in the source code directly. 🏁 Script executed: #!/bin/bash
# Description: Search for deployment and build configuration files
echo "Searching for deployment configuration files..."
fd -e "astro.config" -o -e "astro.config.mjs" -o -e "astro.config.ts" -o -e "netlify.toml" -o -e "vercel.json" -o -e "_headers" -o -e "_redirects" 2>/dev/null
echo ""
echo "Checking for astro integrations or middleware that might set headers..."
rg -n "setHeader|addHeader|middleware" --type ts --type js -B 2 -A 2 2>/dev/null | head -30
echo ""
echo "Looking for security-related configuration..."
rg -n "secure|security|header" --type ts --type js --type toml --type json -i 2>/dev/null | head -20Length of output: 167 Add Subresource Integrity (SRI) or implement Content Security Policy for external Termly script. Termly does not provide a Subresource Integrity (integrity) hash for embed-policy.min.js, and no Content Security Policy is configured in the codebase to restrict the script source. Loading this external script without protection creates a security risk—if app.termly.io is compromised, malicious code could be injected. Recommended mitigations:
🤖 Prompt for AI Agents |
||
| </StarlightPage> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Consider privacy implications of third-party embed.
Loading a third-party service (Termly) on your privacy policy page may result in user tracking or data collection by Termly. Ensure this is compliant with your privacy policy and consider whether visitors should be notified.
You may want to review Termly's privacy practices:
🌐 Web query:
💡 Result:
Short answer — Termly's embed-policy.min.js (the script used to embed Termly-hosted policies) collects minimal visitor and device/usage data needed to render and log consent. According to Termly's docs and privacy info this includes things like:
Termly also says it minimizes/anonymizes visitor data and offers an EU-only data storage option for consents. [1][2]
Sources: Termly support & privacy pages summarizing “visitor data” and embed usage. [1][2][3]
Length of output: 812
Ensure Termly's data collection is properly disclosed on the privacy policy page.
The privacy-policy.astro file loads Termly's embed script without visible disclosure. Termly collects consent logs, IP address, browser and device identifiers, OS, language, user-agent, referring URLs, timestamps, and pages visited. Since visitors come to this page specifically to review privacy practices, consider adding a disclosure about this third-party tracking or verify that Termly's hosted policy embedded on this page adequately discloses this data collection.