### Secrover Configuration Example (`config.yaml`) Source: https://context7.com/secrover/secrover/llms.txt Defines project name, repositories to audit, and domains to inspect. Ensure private repositories include a `GITHUB_TOKEN` environment variable. ```yaml # config.yaml — full example with all supported fields project: name: Acme Platform # Domains to audit (SSL, TLS, headers, ports, HTTP→HTTPS redirect) domains: - acme.com - api.acme.com - staging.acme.com # Repositories to clone, scan for dependency CVEs, and static code issues repos: - url: https://github.com/acme/backend description: "Main backend API service" branch: "main" - url: https://github.com/acme/frontend description: "React web application" branch: "release" - url: https://github.com/acme/private-lib description: "Internal shared library (private repo, needs GITHUB_TOKEN)" # branch defaults to "main" when omitted ``` -------------------------------- ### rclone.conf Setup for Remote Export Source: https://context7.com/secrover/secrover/llms.txt Configuration file for rclone, defining various remote storage types like SFTP, S3, and WebDAV. This file should be mounted into the container at /root/.config/rclone/rclone.conf. ```ini # rclone.conf — mount into container at /root/.config/rclone/rclone.conf [prod-sftp] type = sftp host = myserver.com user = deploy pass = mypassword [s3-backup] type = s3 provider = AWS access_key_id = AKIAIOSFODNN7EXAMPLE secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY region = us-east-1 [nextcloud] type = webdav url = https://cloud.example.com/remote.php/webdav user = alice pass = secret ``` -------------------------------- ### Run Scheduled Secrover Scans (Cron Mode) with Docker Source: https://context7.com/secrover/secrover/llms.txt Starts Supercronic to run scans on a schedule defined by `CRON_SCHEDULE`. Logs are written to `/output/secrover.log`. ```bash # Scan every day at midnight UTC, keep container running docker run -d \ -v "$(pwd)/config.yaml:/config.yaml" \ -v "$(pwd)/output:/output" \ -e CRON_SCHEDULE="0 0 * * *" \ --name secrover-scheduled \ secrover/secrover # Scan every Monday at 08:00 UTC docker run -d \ --env-file .env \ -v "$(pwd)/config.yaml:/config.yaml" \ -v "$(pwd)/output:/output" \ -e CRON_SCHEDULE="0 8 * * 1" \ secrover/secrover # Follow logs docker logs -f secrover-scheduled # or inside container: # tail -f /output/secrover.log ``` -------------------------------- ### Run Automated Scans with Docker (Cron Mode) Source: https://github.com/secrover/secrover/blob/develop/README.md Schedule recurring scans using Docker by setting the CRON_SCHEDULE environment variable. This example runs a scan every day at midnight. ```bash docker run -it --rm \ -v "$(pwd)/config.yaml:/config.yaml" \ -v "$(pwd)/output:/output" \ -e CRON_SCHEDULE="0 0 * * *" \ secrover/secrover ``` -------------------------------- ### Set Environment Variables with -e Flags Source: https://github.com/secrover/secrover/blob/develop/README.md Alternatively to using a .env file, environment variables can be passed directly when running the Docker container using the -e flag. This example sets CONFIG_FILE and OUTPUT_DIR. ```bash -e CONFIG_FILE=/config.yaml -e OUTPUT_DIR=/output ``` -------------------------------- ### Run One-Time Secrover Scan with Docker Source: https://context7.com/secrover/secrover/llms.txt Mounts configuration and output directories to run a scan. Use `--env-file .env` for private repositories. ```bash # One-time scan — public repositories, no auth needed docker run -it --rm \ -v "$(pwd)/config.yaml:/config.yaml" \ -v "$(pwd)/output:/output" \ secrover/secrover # One-time scan — with GitHub token for private repositories docker run -it --rm \ --env-file .env \ -v "$(pwd)/config.yaml:/config.yaml" \ -v "$(pwd)/output:/output" \ secrover/secrover # Output files produced: # output/index.html — main summary report # output/dependencies_report.html — CVE findings per repo # output/code_report.html — static analysis findings per repo # output/domains_report.html — domain security audit ``` -------------------------------- ### Run One-Time Scan with Docker Source: https://github.com/secrover/secrover/blob/develop/README.md Execute a one-time scan using Docker. Mounts the config.yaml and output directories and loads environment variables from .env. The --env-file flag is optional if only public repositories are scanned. ```bash docker run -it --rm \ --env-file .env \ -v "$(pwd)/config.yaml:/config.yaml" \ -v "$(pwd)/output:/output" \ secrover/secrover ``` -------------------------------- ### Load YAML Configuration Source: https://context7.com/secrover/secrover/llms.txt Reads and parses a YAML configuration file. Expects 'project', 'repos', and 'domains' keys. Raises FileNotFoundError if the path is invalid. ```python from pathlib import Path from secrover.config import load_config config = load_config(Path("/config.yaml")) project = config.get("project", {}) repos = config.get("repos", []) domains = config.get("domains", []) print(project["name"]) print(len(repos)) print(domains) ``` -------------------------------- ### Run Secrover with rclone Mount Source: https://github.com/secrover/secrover/blob/develop/docs/export.md Execute Secrover using Docker, mounting the `.env` file and the `rclone.conf` file. The `rclone.conf` should be mounted read-only to the specified path within the container. ```bash docker run -it --rm \ --env-file .env \ -v "$(pwd)/config.yaml:/config.yaml" \ -v "$(pwd)/rclone.conf:/root/.config/rclone/rclone.conf:ro" \ secrover/secrover ``` -------------------------------- ### Secrover Environment Variables Reference (`.env`) Source: https://context7.com/secrover/secrover/llms.txt Controls runtime options for Secrover. Required paths can often be omitted when using Docker. `GITHUB_TOKEN` is needed for private repositories. ```bash # .env — complete reference # --- Required paths (defaults shown, safe to omit for Docker usage) --- CONFIG_FILE=/config.yaml # YAML config inside container OUTPUT_DIR=/output/ # Where HTML reports are written REPOS_DIR=repos/ # Where Git repos are cloned # --- Private repositories --- GITHUB_TOKEN=ghp_xxxxxxxxxxxx # GitHub PAT with repo:read for private repos # --- Scheduled scanning --- CRON_SCHEDULE="0 6 * * *" # Run every day at 06:00 UTC (cron syntax) # --- Remote export via rclone --- EXPORT_ENABLED=true RCLONE_REMOTES=prod-sftp,s3-backup # Comma-separated remote names from rclone.conf RCLONE_PATH=/secrover-reports/$(date +%Y-%m-%d) # Timestamped subfolder per run # --- Geolocation (bundled in Docker image) --- IP2LOCATION_DB_PATH=data/IP2Location/IP2LOCATION-LITE-DB1.BIN ``` -------------------------------- ### Configure Secrover Scans with YAML Source: https://github.com/secrover/secrover/blob/develop/README.md Define the projects, domains, and repositories to be scanned by Secrover using this YAML configuration file. Ensure correct URLs and descriptions are provided. ```yaml project: name: My project domains: - my-domain.com - subdomain.my-domain.com repos: - url: https://github.com/your-org/your-repo description: "Short description of the project" branch: "main" - url: https://github.com/your-org/another-repo description: "Another awesome project" ``` -------------------------------- ### Configure rclone Remotes Source: https://github.com/secrover/secrover/blob/develop/docs/export.md Define your remote storage connections in an rclone.conf file. Ensure the remote names match those specified in the `RCLONE_REMOTES` environment variable. ```ini [prod-remote] type = sftp host = myserver.com user = deploy pass = mypassword [nextcloud] type = webdav url = https://cloud.example.com/remote.php/webdav user = alice pass = secret ``` -------------------------------- ### Enable and Configure Export in .env Source: https://github.com/secrover/secrover/blob/develop/docs/export.md Set `EXPORT_ENABLED` to `true` to activate the export functionality. Specify the rclone remote names in `RCLONE_REMOTES` and the desired remote path prefix in `RCLONE_PATH`. ```env EXPORT_ENABLED=true RCLONE_REMOTES=prod-remote,nextcloud RCLONE_PATH=/secrover-reports/ ``` -------------------------------- ### load_config Source: https://context7.com/secrover/secrover/llms.txt Reads and parses a YAML configuration file. It expects keys like 'project', 'repos', and 'domains'. Raises FileNotFoundError if the specified path does not exist. ```APIDOC ## `load_config(path: Path)` — Load YAML Configuration Reads and parses the YAML configuration file. Returns a dict with `project`, `repos`, and `domains` keys. Raises `FileNotFoundError` if the path does not exist. ```python from pathlib import Path from secrover.config import load_config config = load_config(Path("/config.yaml")) project = config.get("project", {{}}) # {{"name": "Acme Platform"}} repos = config.get("repos", []) # list of repo dicts domains = config.get("domains", []) # ["acme.com", "api.acme.com"] print(project["name"]) # "Acme Platform" print(len(repos)) # 3 print(domains) # ['acme.com', 'api.acme.com', 'staging.acme.com'] ``` ``` -------------------------------- ### check_dependencies Source: https://context7.com/secrover/secrover/llms.txt Performs a dependency vulnerability audit using `osv-scanner`. It parses results into a summary, identifies vulnerable packages, their severity, and provides links to advisories. Writes a report to `output_path`. ```APIDOC ## `check_dependencies(project, repos, repos_path, output_path, enabled_checks)` — Dependency Vulnerability Audit Runs `osv-scanner` on each cloned repository in SARIF format and parses the results into a structured summary. Identifies vulnerable packages, their versions, severity levels (critical/high/moderate/low/info), the manifest file containing the dependency, and linked CVE/GHSA advisory URLs. Writes `dependencies_report.html` to `output_path`. ```python from pathlib import Path from secrover.audits.dependencies import check_dependencies project = {"name": "Acme Platform"} repos = [{"url": "https://github.com/acme/backend", "name": "backend"}] enabled_checks = {"dependencies": True, "code": True, "domains": False} summary = check_dependencies( project=project, repos=repos, repos_path=Path("repos/"), output_path=Path("output/"), enabled_checks=enabled_checks, ) # summary structure: # { # "critical": 1, # "high": 3, # "moderate": 7, # "low": 2, # "info": 0, # "total": 13, # added by aggregate # "nbRepos": 1 # } print(f"Critical vulns: {summary['critical']}") # Critical vulns: 1 print(f"Total vulns: {summary['total']}") # Total vulns: 13 # Individual repo audit result shape (from run_audit()): # { # "total_vulnerabilities": 3, # "vulnerabilities_by_severity": {"critical": 0, "high": 1, "moderate": 2, "low": 0, "info": 0}, # "packages_by_file": { # "requirements.txt": [ # {"name": "requests", "version": "2.27.1", "severity": "high", # "file": "requirements.txt", "cves": ["GHSA-j8r2-6x86-q33q"], # "url": "https://osv.dev/vulnerability/GHSA-j8r2-6x86-q33q"} # ] # }, # "packages_impacted": [...] # } ``` ``` -------------------------------- ### Configure Timestamped Exports Source: https://github.com/secrover/secrover/blob/develop/docs/export.md Append a date format string to `RCLONE_PATH` to create a new subfolder for each export run. Secrover automatically expands the date format to UTC timestamps. ```env RCLONE_PATH=/secrover-reports/$(date +%Y-%m-%d_%H-%M-%S) ``` -------------------------------- ### Create .env file for GitHub Token Source: https://github.com/secrover/secrover/blob/develop/README.md Create a .env file in the same directory as config.yaml to store your GitHub token. Ensure this file is not committed to version control. ```env GITHUB_TOKEN=yourgeneratedtokenhere ``` -------------------------------- ### GitHub Actions Workflow for Secrover Source: https://context7.com/secrover/secrover/llms.txt This workflow automates security audits using Secrover. It checks out the code, runs Secrover with a GitHub token and configuration, uploads reports as an artifact, and deploys them to GitHub Pages. ```yaml # .github/workflows/secrover.yml name: Security Audit on: schedule: - cron: "0 6 * * 1" # Every Monday at 06:00 UTC workflow_dispatch: # Allow manual trigger permissions: contents: read pages: write id-token: write jobs: audit: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Run Secrover run: | docker run --rm \ -e GITHUB_TOKEN=${{ secrets.SECROVER_GITHUB_TOKEN }} \ -v "${{ github.workspace }}/config.yaml:/config.yaml" \ -v "${{ github.workspace }}/output:/output" \ secrover/secrover - name: Upload reports as artifact uses: actions/upload-pages-artifact@v3 with: path: output/ deploy: needs: audit runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 ``` -------------------------------- ### Run Secrover Docker Container Source: https://context7.com/secrover/secrover/llms.txt Command to run the Secrover Docker container, mounting necessary directories and environment files. Ensures rclone export is enabled via environment variables. ```bash # Run with rclone export enabled docker run -it --rm \ --env-file .env \ -v "$(pwd)/config.yaml:/config.yaml" \ -v "$(pwd)/output:/output" \ -v "$(pwd)/rclone.conf:/root/.config/rclone/rclone.conf:ro" \ secrover/secrover ``` -------------------------------- ### Clone or Update Repositories Source: https://context7.com/secrover/secrover/llms.txt Clones repositories into a specified path, updating existing ones by resetting changes and pulling latest commits. Injects a GitHub PAT for private repositories via HTTPS URLs. Returns successfully processed repositories. ```python from pathlib import Path from secrover.git import clone_repos repos = [ {"url": "https://github.com/acme/backend", "branch": "main", "description": "API"}, {"url": "https://github.com/acme/private-lib", "branch": "main"}, ] # token=None for public repos; supply GitHub PAT for private repos valid_repos = clone_repos( repos_path=Path("repos/"), repos=repos, token="ghp_xxxxxxxxxxxx" ) # valid_repos contains only successfully cloned/pulled entries # Repos are stored at: repos/backend/, repos/private-lib/ print(valid_repos) ``` -------------------------------- ### Generate HTML Report Source: https://context7.com/secrover/secrover/llms.txt Renders Jinja2 HTML templates for different report types (index, dependencies, code, domains). Automatically injects Secrover version and audit timestamp. Writes the report file to the specified output path. ```python from pathlib import Path from secrover.report import generate_html_report # Manually render the main summary (index) report generate_html_report( report_type="index", results={ "project": {"name": "Acme Platform"}, "dependencies_severity_order": ["critical", "high", "moderate", "low", "info"], "code_severity_order": ["high", "moderate", "low"], "dependencies_summary": {"critical": 1, "high": 3, "total": 4, "nbRepos": 2}, "code_summary": {"high": 2, "moderate": 5, "total": 7, "nbRepos": 2}, "domains_summary": {"high": 0, "total": 0, "nbDomains": 3}, "enabled_checks": {"dependencies": True, "code": True, "domains": True}, }, output_path=Path("output/"), ) # Writes: output/index.html # Render a specific sub-report generate_html_report("dependencies", {...}, Path("output/")) # Writes: output/dependencies_report.html generate_html_report("code", {...}, Path("output/")) # Writes: output/code_report.html generate_html_report("domains", {...}, Path("output/")) # Writes: output/domains_report.html ``` -------------------------------- ### Dependency Vulnerability Audit Source: https://context7.com/secrover/secrover/llms.txt Performs a dependency vulnerability audit using osv-scanner on cloned repositories, outputting results in SARIF format. Parses results into a structured summary and writes an HTML report. Requires 'dependencies' to be enabled in enabled_checks. ```python from pathlib import Path from secrover.audits.dependencies import check_dependencies project = {"name": "Acme Platform"} repos = [{"url": "https://github.com/acme/backend", "name": "backend"}] enabled_checks = {"dependencies": True, "code": True, "domains": False} summary = check_dependencies( project=project, repos=repos, repos_path=Path("repos/"), output_path=Path("output/"), enabled_checks=enabled_checks, ) # summary structure: # { # "critical": 1, # "high": 3, # "moderate": 7, # "low": 2, # "info": 0, # "total": 13, # added by aggregate # "nbRepos": 1 # } print(f"Critical vulns: {summary['critical']}") print(f"Total vulns: {summary['total']}") ``` -------------------------------- ### Static Code Analysis Source: https://context7.com/secrover/secrover/llms.txt Conducts static code analysis using opengrep scan on cloned repositories to detect security anti-patterns. Maps SARIF severity levels and writes a code report. Requires 'code' to be enabled in enabled_checks. ```python from pathlib import Path from secrover.audits.code import check_code project = {"name": "Acme Platform"} repos = [ {"url": "https://github.com/acme/backend", "name": "backend", "description": "API"}, {"url": "https://github.com/acme/frontend", "name": "frontend", "description": "UI"}, ] enabled_checks = {"dependencies": True, "code": True, "domains": False} summary = check_code( project=project, repos=repos, repos_path=Path("repos/"), output_path=Path("output/"), enabled_checks=enabled_checks, ) # summary structure: # {"high": 2, "moderate": 5, "low": 8, "total": 15, "nbRepos": 2} ``` -------------------------------- ### clone_repos Source: https://context7.com/secrover/secrover/llms.txt Clones or updates Git repositories. If a repository exists locally, it resets changes and pulls the latest commit. It can inject a GitHub PAT for private repositories. Returns a list of successfully cloned or updated repositories. ```APIDOC ## `clone_repos(repos_path, repos, token)` — Clone or Update Repositories Clones each repository listed in the config into `repos_path`. If the repo already exists locally, it resets any local changes and pulls the latest commits. Injects a GitHub PAT into HTTPS URLs when `token` is provided. Returns only the repos that were successfully cloned or updated. ```python from pathlib import Path from secrover.git import clone_repos repos = [ {"url": "https://github.com/acme/backend", "branch": "main", "description": "API"}, {"url": "https://github.com/acme/private-lib", "branch": "main"}, ] # token=None for public repos; supply GitHub PAT for private repos valid_repos = clone_repos( repos_path=Path("repos/"), repos=repos, token="ghp_xxxxxxxxxxxx" ) # valid_repos contains only successfully cloned/pulled entries # Repos are stored at: repos/backend/, repos/private-lib/ print(valid_repos) # [{'url': 'https://github.com/acme/backend', 'branch': 'main', 'description': 'API'}, # {'url': 'https://github.com/acme/private-lib', 'branch': 'main'}] ``` ``` -------------------------------- ### Export Reports Remotely via rclone Source: https://context7.com/secrover/secrover/llms.txt Uploads the entire output directory to one or more rclone remotes. Supports timestamped folders in the remote path using shell date formatting. Ensure rclone is configured. ```python from pathlib import Path from secrover.exporter import export_reports # Upload to a single SFTP remote export_reports( output_dir=Path("/output"), remotes=["prod-sftp"], remote_path=Path("/secrover-reports/"), ) # Runs: rclone copy /output prod-sftp:/secrover-reports/ -v --create-empty-src-dirs # ✅ Export to prod-sftp successful. # Upload to multiple remotes with a timestamped folder (date expanded at runtime) export_reports( output_dir=Path("/output"), remotes=["prod-sftp", "s3-backup", "nextcloud"], remote_path=Path("/secrover-reports/$(date +%Y-%m-%d_%H-%M-%S)"), ) # Remote path becomes e.g.: /secrover-reports/2025-10-11_12-00-00/ # Uploads to all three remotes in sequence. ``` -------------------------------- ### check_code Source: https://context7.com/secrover/secrover/llms.txt Performs static code analysis using `opengrep scan --sarif`. It detects security anti-patterns and code vulnerabilities, mapping SARIF severity levels to high, moderate, and low. A report is written to `output_path`. ```APIDOC ## `check_code(project, repos, repos_path, output_path, enabled_checks)` — Static Code Analysis Runs `opengrep scan --sarif` on each cloned repository to detect security anti-patterns and code vulnerabilities. Maps SARIF severity levels (`error` → `high`, `warning` → `moderate`, `note` → `low`). Writes `code_report.html` to `output_path`. ```python from pathlib import Path from secrover.audits.code import check_code project = {"name": "Acme Platform"} repos = [ {"url": "https://github.com/acme/backend", "name": "backend", "description": "API"}, {"url": "https://github.com/acme/frontend", "name": "frontend", "description": "UI"}, ] enabled_checks = {"dependencies": True, "code": True, "domains": False} summary = check_code( project=project, repos=repos, repos_path=Path("repos/"), output_path=Path("output/"), enabled_checks=enabled_checks, ) # summary structure: # {"high": 2, "moderate": 5, "low": 8, "total": 15, "nbRepos": 2} # Per-repo data shape written to the HTML report: # { # "url": "https://github.com/acme/backend", # "description": "API", # "findings_count": 7, # "findings_by_severity": {"high": 2, "moderate": 3, "low": 2}, # "findings": [ # { # "severity": "high", # "rule_id": "python.lang.security.audit.exec-detected.exec-detected", # "message": "Use of exec() detected.", # "location": {"file": "src/utils.py", "line": 42} # } # ] # } ``` ``` -------------------------------- ### check_domains Source: https://context7.com/secrover/secrover/llms.txt Audits domains for SSL certificate validity, HTTPS redirect, TLS versions, open ports, HTTP security headers, and hosting country. Writes a domains report to the specified output path. ```APIDOC ## `check_domains(project, domains, ip_db_path, output_path, enabled_checks)` — Domain Security Audit Audits each domain for SSL certificate validity and expiry, HTTP→HTTPS redirect, supported TLS versions (flags TLSv1/TLSv1.1 as insecure), open ports, HTTP security headers (HSTS, CSP, X-Frame-Options, etc.), and hosting country. Runs port checks concurrently via `ThreadPoolExecutor`. Writes `domains_report.html` to `output_path`. ```python from pathlib import Path from secrover.audits.domains import check_domains project = {"name": "Acme Platform"} domains = ["acme.com", "api.acme.com"] enabled_checks = {"dependencies": False, "code": False, "domains": True} summary = check_domains( project=project, domains=domains, ip_db_path=Path("data/IP2Location/IP2LOCATION-LITE-DB1.BIN"), output_path=Path("output/"), enabled_checks=enabled_checks, ) # summary: {"high": 0, "moderate": 0, "low": 0, "total": 0, "nbDomains": 2} # Per-domain data shape written to the HTML report: # { # "domain": "acme.com", # "country": "🇺🇸", # "active": True, # "https_available": True, # "http_to_https_redirect": True, # "tls_versions": { # "TLSv1.2": {"secure": True}, # "TLSv1.3": {"secure": True} # }, # "hsts_present": True, # "hsts_value": "max-age=31536000; includeSubDomains", # "csp": "default-src 'self'", # "x_content_type_options": "nosniff", # "x_frame_options": "DENY", # "referrer_policy": "strict-origin-when-cross-origin", # "permissions_policy": None, # "open_ports": [80, 443], # "valid": True, # "issuer": {"organizationName": "Let's Encrypt"}, # "not_after": "2025-12-01", # "days_remaining": 120 # } ``` ``` -------------------------------- ### generate_html_report Source: https://context7.com/secrover/secrover/llms.txt Renders HTML reports using Jinja2 templates for different audit types (index, dependencies, code, domains). Writes the generated report to the specified output path. ```APIDOC ## `generate_html_report(report_type, results, output_path)` — HTML Report Generation Renders one of four Jinja2 HTML templates (`index`, `dependencies`, `code`, `domains`) with the provided results dict. Automatically injects Secrover version, tool versions, audit timestamp, and base64-encoded logo/favicon assets. Writes the file to `output_path`. ```python from pathlib import Path from secrover.report import generate_html_report # Manually render the main summary (index) report generate_html_report( report_type="index", results={ "project": {"name": "Acme Platform"}, "dependencies_severity_order": ["critical", "high", "moderate", "low", "info"], "code_severity_order": ["high", "moderate", "low"], "dependencies_summary": {"critical": 1, "high": 3, "total": 4, "nbRepos": 2}, "code_summary": {"high": 2, "moderate": 5, "total": 7, "nbRepos": 2}, "domains_summary": {"high": 0, "total": 0, "nbDomains": 3}, "enabled_checks": {"dependencies": True, "code": True, "domains": True}, }, output_path=Path("output/"), ) # Writes: output/index.html # Render a specific sub-report generate_html_report("dependencies", {...}, Path("output/")) # Writes: output/dependencies_report.html generate_html_report("code", {...}, Path("output/")) # Writes: output/code_report.html generate_html_report("domains", {...}, Path("output/")) # Writes: output/domains_report.html ``` ``` -------------------------------- ### export_reports Source: https://context7.com/secrover/secrover/llms.txt Uploads the contents of the output directory to specified rclone remotes. Supports timestamped remote paths. ```APIDOC ## `export_reports(output_dir, remotes, remote_path)` — Remote Report Export via rclone Uploads the entire `output/` directory to one or more rclone remotes using `rclone copy`. Supports shell-style `$(date +FORMAT)` expressions in `remote_path` for timestamped exports — these are expanded to UTC timestamps at runtime. ```python from pathlib import Path from secrover.exporter import export_reports # Upload to a single SFTP remote export_reports( output_dir=Path("/output"), remotes=["prod-sftp"], remote_path=Path("/secrover-reports/"), ) # Runs: rclone copy /output prod-sftp:/secrover-reports/ -v --create-empty-src-dirs # ✅ Export to prod-sftp successful. # Upload to multiple remotes with a timestamped folder (date expanded at runtime) export_reports( output_dir=Path("/output"), remotes=["prod-sftp", "s3-backup", "nextcloud"], remote_path=Path("/secrover-reports/$(date +%Y-%m-%d_%H-%M-%S)"), ) # Remote path becomes e.g.: /secrover-reports/2025-10-11_12-00-00/ # Uploads to all three remotes in sequence. ``` ### rclone.conf setup for remote export ```ini # rclone.conf — mount into container at /root/.config/rclone/rclone.conf [prod-sftp] type = sftp host = myserver.com user = deploy pass = mypassword [s3-backup] type = s3 provider = AWS access_key_id = AKIAIOSFODNN7EXAMPLE secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY region = us-east-1 [nextcloud] type = webdav url = https://cloud.example.com/remote.php/webdav user = alice pass = secret ``` ```bash # Run with rclone export enabled docker run -it --rm \ --env-file .env \ -v "$(pwd)/config.yaml:/config.yaml" \ -v "$(pwd)/output:/output" \ -v "$(pwd)/rclone.conf:/root/.config/rclone/rclone.conf:ro" \ secrover/secrover ``` ``` -------------------------------- ### Perform Domain Security Audit Source: https://context7.com/secrover/secrover/llms.txt Audits domains for SSL validity, redirects, TLS versions, open ports, security headers, and hosting country. Writes a domains report to the specified output path. Ensure the IP database is available. ```python from pathlib import Path from secrover.audits.domains import check_domains project = {"name": "Acme Platform"} domains = ["acme.com", "api.acme.com"] enabled_checks = {"dependencies": False, "code": False, "domains": True} summary = check_domains( project=project, domains=domains, ip_db_path=Path("data/IP2Location/IP2LOCATION-LITE-DB1.BIN"), output_path=Path("output/"), enabled_checks=enabled_checks, ) # summary: {"high": 0, "moderate": 0, "low": 0, "total": 0, "nbDomains": 2} # Per-domain data shape written to the HTML report: # { # "domain": "acme.com", # "country": "🇺🇸", # "active": True, # "https_available": True, # "http_to_https_redirect": True, # "tls_versions": { # "TLSv1.2": {"secure": True}, # "TLSv1.3": {"secure": True} # }, # "hsts_present": True, # "hsts_value": "max-age=31536000; includeSubDomains", # "csp": "default-src 'self'", # "x_content_type_options": "nosniff", # "x_frame_options": "DENY", # "referrer_policy": "strict-origin-when-cross-origin", # "permissions_policy": None, # "open_ports": [80, 443], # "valid": True, # "issuer": {"organizationName": "Let's Encrypt"}, # "not_after": "2025-12-01", # "days_remaining": 120 # } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.