Skip to main content
Palyra implements a multi-layered security gate architecture integrated into the CI/CD pipeline to ensure the integrity of the software supply chain, detect secret leakage, and mitigate vulnerabilities in both Rust and Node.js dependency graphs. These gates are primarily orchestrated via the security-gates job in the GitHub Actions workflow.

Supply Chain Scanning Architecture

The security pipeline combines industry-standard scanners with custom governance scripts to validate the repository state before any release or PR merge.

Dependency Auditing and Governance

Palyra manages vulnerabilities through three distinct scanners: npm audit, cargo audit, and osv-scanner.

1. Node.js (npm) Audit with Dev Allowlist

The system runs a dual-audit strategy for the Web Console and Desktop UI. It distinguishes between production (runtime) vulnerabilities and development-only vulnerabilities to prevent blocking CI on non-exploitable build-tool issues while maintaining strict zero-vulnerability requirements for runtime code.

2. Rust (Cargo) Audit and Deny

The Rust workspace is protected by cargo-audit and cargo-deny.

3. OSV Scanner

Palyra uses the Google OSV Scanner to provide a cross-ecosystem view of vulnerabilities, scanning the Cargo.lock file against the Open Source Vulnerability database .github/workflows/security.yml#101-104.

Downstream Patch Governance (glib)

In cases where an upstream fix is unavailable due to transitive constraints (e.g., Tauri’s dependency on older GTK/glib versions), Palyra employs a “Downstream Patch” model. Supply Chain Data Flow Title: Security Gate Data Flow Sources: .github/workflows/security.yml#30-132, apps/desktop/src-tauri/docs/security/advisories/GHSA-wrw7-89jp-8q8g.md#52-53

Secret Detection and Pattern Scanning

Palyra implements aggressive detection for sensitive data and high-risk coding patterns.

Gitleaks Secret Detection

The pipeline uses gitleaks to scan the entire repository history for secrets, API keys, and certificates .github/workflows/security.yml#120-124. It uses a project-specific configuration in .gitleaks.toml to minimize false positives while ensuring no real credentials reach the main branch.

High-Risk Pattern Scan

A custom script scripts/check-high-risk-patterns.sh performs static analysis via grep/regex to find dangerous code patterns that standard linters might miss .github/workflows/security.yml#128-129. This includes:
  • Insecure usage of unsafe in Rust.
  • Hardcoded debug flags.
  • Bypasses of the palyra-policy engine.
Code Entity Mapping: Pattern Scanning Title: Security Script to Code Entity Mapping Sources: .github/workflows/ci.yml#179-186, CODEOWNERS#7-10

Supply Chain Integrity (SBOM & SLSA)

To provide transparency and verify the provenance of release artifacts, Palyra generates standardized security metadata.

SBOM Generation

Palyra uses cargo-cyclonedx to generate a Software Bill of Materials (SBOM) in JSON format .github/workflows/security.yml#131-132. This document lists all components, versions, and licenses included in the Rust binaries. The SBOM files are collected and uploaded as security artifacts for every successful CI run .github/workflows/security.yml#134-145.

SLSA Provenance and Attestations

During the release process, Palyra generates build attestations to satisfy SLSA (Supply-chain Levels for Software Artifacts) requirements.
Artifact TypeToolingOutput Format
Rust SBOMcargo-cyclonedxsbom.json
Secret Scangitleaksgitleaks-results.sarif
Vulnerability Reportosv-scannerosv-results.json
Audit Summaryvalidate-npm-audit-dev-allowlist.mjsnpm-audit-dev-summary.json
Sources: .github/workflows/security.yml#123-148, .github/workflows/release.yml#81-90

Security Policy and Reporting

The project maintains a strict SECURITY.md policy. Security fixes are prioritized for the main branch and the latest release SECURITY.md#12-14. Sources: SECURITY.md#1-74, .github/workflows/ci.yml#179-180