import React, { useEffect, useState } from "react"; import { Link } from "react-router-dom"; import { api } from "../services/api"; import { usePageTitle } from "../hooks/usePageTitle"; import { ArrowLeft, Clock3, Database, KeyRound, Mail, Server, Share2, ShieldCheck, UserCheck, } from "lucide-react"; const policySections = [ { title: "Information We Process", Icon: Database, items: [ "Account information, including your username and a one-way hashed password.", "Gitea connection details, including your Gitea username, instance URL, and Personal Access Token.", "AWS credentials and region settings used to create and manage preview infrastructure.", "Repository and pull request metadata, such as repository name, PR number, title, and commit SHA.", "Preview deployment logs, job status, preview URLs, EC2 instance identifiers, and related operational metadata.", "Ephemeral SSH private keys generated for preview instances.", ], }, { title: "How Information Is Used", Icon: KeyRound, items: [ "Gitea credentials are used to register and maintain webhooks, clone repositories, read pull request metadata, and post preview status comments.", "AWS credentials are used to provision, tag, inspect, and terminate EC2 resources for previews in your AWS account.", "Deployment logs and metadata are used to show preview status, diagnose failed builds, and support administrative operation of this instance.", "Webhook secrets are used to verify that incoming webhook requests were sent by the configured Gitea instance.", ], }, ]; const detailSections = [ { title: "Security", Icon: ShieldCheck, body: "Sensitive credentials, including Gitea tokens, AWS access keys, AWS secret access keys, and SSH private keys, are encrypted at rest with AES-256-GCM. Passwords are stored as bcrypt hashes. Webhook signatures are verified before webhook payloads are processed.", }, { title: "Infrastructure", Icon: Server, body: "Preview instances are launched in your AWS account using the credentials you provide. PR Previews manages only the resources required to operate previews, including EC2 instances, security groups, and temporary SSH keys. Preview instances are terminated when a pull request is closed, a preview is manually stopped, or the configured inactivity timeout is reached.", }, { title: "Retention", Icon: Clock3, body: "Preview records, logs, and metadata are retained according to the retention period configured by the instance administrator. By default, stopped and failed preview records are eligible for cleanup after 30 days. Ephemeral SSH keys are removed when their associated preview instance is terminated.", }, { title: "Data Sharing", Icon: Share2, body: "This instance does not include third-party analytics, advertising trackers, or external data sharing features. Data is processed by this PR Previews instance, the configured Gitea instance, and AWS services in the account used for preview infrastructure.", }, { title: "Your Responsibilities", Icon: UserCheck, body: "Users are responsible for providing credentials with appropriate scopes and for managing access to the Gitea repositories and AWS accounts connected to this instance. Administrators are responsible for configuring retention, access control, and operational policies for this deployment.", }, ]; export function Privacy() { const [contactEmail, setContactEmail] = useState(null); usePageTitle("Privacy Policy"); useEffect(() => { api.admin.getSettings().then(res => { if (res.ok && res.data?.contactEmail) setContactEmail(res.data.contactEmail); }).catch(() => {}); }, []); return (
); }