-
Notifications
You must be signed in to change notification settings - Fork 1
Governance PLUGIN SUBMODULE ROLLBACK
Navigation: Home > Contributing > Governance
/// @file docs/governance/PLUGIN_SUBMODULE_ROLLBACK.md /// @brief Wave C Batch 3: Plugin Submodule Rollback Procedure & Troubleshooting
Wave C Batch 3 implements fail-closed gates for private submodule scoping and credential leakage prevention. This document provides rollback procedures when these gates fail and troubleshooting steps for common issues.
PR targeting community or minimal branch fails with:
FAIL-CLOSED: plugins/themisdb_* is a private plugin but does not have shallow=true in .gitmodules
A private plugin submodule entry in .gitmodules is missing the shallow = true directive or the submodule is being initialized without the shallow flag during checkout.
# View .gitmodules and find the offending entry
git show HEAD:.gitmodules | grep -A 5 "themisdb_ethic_ai\|themisdb_storage\|themisdb_importer"Look for entries like:
[submodule "plugins/themisdb_ethic_ai"]
path = plugins/themisdb_ethic_ai
url = https://github.com/makr-code/themisdb_ethic_ai.git
shallow = true # THIS MUST BE PRESENT
branch = develop
commit = ce401ad9d604012a2c02655e79f5c17f57a9f82dIf the shallow = true line is missing:
# Option A: Edit .gitmodules directly
git config -f .gitmodules submodule.plugins/themisdb_ethic_ai.shallow true
# Option B: Manual edit
vi .gitmodules
# Add: shallow = trueEnsure the submodule has a known-good commit hash:
# Check existing commit
git config -f .gitmodules submodule.plugins/themisdb_ethic_ai.commit
# If missing, get the latest known-good commit from the private repo
# (requires access to the private repo)
git ls-remote https://github.com/makr-code/themisdb_ethic_ai.git refs/heads/develop
# Then add:
git config -f .gitmodules submodule.plugins/themisdb_ethic_ai.commit <COMMIT_HASH>git add .gitmodules
git commit -m "Wave C Batch 3: Fix private submodule shallow configuration for community builds"Push the PR and verify the Scoped Checkout Validation gate passes.
PR fails with:
[CRITICAL] aws_secret_key detected at path/to/file:42
::error::FAIL-CLOSED: Critical credential patterns found in PR diff
Code changes contain patterns matching private credentials:
- AWS Access Keys or Secret Keys
- Azure connection strings
- GCP API keys or service account keys
- GitHub tokens or OAuth tokens
- SSH/PGP private keys
- Private environment variable references
Step 1: Identify All Matches
# Re-run the scanner locally to find all occurrences
git diff origin/community...HEAD | grep -E "AKIA[0-9A-Z]{16}|aws_secret_access_key|github_token|ssh|BEGIN.*PRIVATE KEY"Step 2: Remove or Replace
# Remove hardcoded credentials entirely
# DO NOT use encrypted files in the repository unless explicitly approved
# Use environment variables or secret management instead
# Example: Replace hardcoded AWS key
# BEFORE: AWS_SECRET_KEY="AKIA2XQRJ7NQKL3MOPQR"
# AFTER: AWS_SECRET_KEY="${env:AWS_SECRET_KEY}" # Load from environmentStep 3: Commit the Fix
git add .
git commit -m "Wave C Batch 3: Remove private credentials from PR diff"If the detected pattern is NOT actually a credential (e.g., documentation, example code):
Step 1: Check Credential Scanner Configuration
The scanner pattern list is defined in .github/workflows/ci-pr-gates.yml under the private-credential-scan job.
Step 2: Request False Positive Allow-List
Create a file .github/scanner-allow-list.yml:
# Patterns to exclude from private-credential scanning
# Use ONLY for legitimate false positives with human approval
false_positives:
- pattern: "AKIA[0-9A-Z]{16}"
reason: "Example AWS key in documentation (docs/examples/)"
approved_by: "@yourname"
approved_date: "2026-08-18"
justification: "This is a sanitized example in the README, not a real key"Step 3: Get Approval Require explicit review and approval from a maintainer before adding to allow-list.
If the credential is real and you can't remove it:
- Rotate the credential immediately at the source (AWS IAM, Azure, GCP, GitHub, etc.)
- Invalidate the old credential
- Update all systems using that credential with the new one
- Only then can you proceed with code changes (after using the new credential)
- Document the rotation in the commit message and PR body under "Security & Credentials Rotated"
Release candidate (RC) tag fails with:
::error::SBOM hash mismatch β FAIL-CLOSED: dependency changed since generation
Dependencies included in the SBOM have changed between SBOM generation and verification, indicating a potential supply-chain integrity issue.
SBOM hashes are locked at tag time for release artifacts. If a dependency changes after tagging:
Once a release candidate tag is created with tag name like v8.1.0-rc.1,
the SBOM is locked and MUST match the dependencies at that moment.
-
Delete the RC tag (if it hasn't been announced or used):
git tag -d v8.1.0-rc.1 git push origin :refs/tags/v8.1.0-rc.1
-
Make the dependency changes on develop:
# Update .gitmodules or vcpkg.json git add .gitmodules vcpkg.json git commit -m "Wave C Batch 3: Update dependencies for RC rebuild"
-
Re-create the RC tag with a new increment:
git tag -a v8.1.0-rc.2 -m "Release Candidate 2 (dependency update)" git push origin v8.1.0-rc.2
Step 1: Verify SBOM Content
# Check the SBOM file generated at tag time
git show v8.1.0-rc.1:SBOM_RELEASE.json | jq '.components[].name'Step 2: Check Dependencies
# Ensure .gitmodules at tag matches SBOM entries
git show v8.1.0-rc.1:.gitmodules | grep -E "path = |url = "
# Verify vcpkg baseline (if using vcpkg)
git show v8.1.0-rc.1:vcpkg-configuration.jsonStep 3: Recompute Expected Hash
# At tag commit, recompute what the SBOM hash should be
git checkout v8.1.0-rc.1
# Regenerate SBOM locally
# Compare hash| Pattern Name | Description | Severity | Regex Example |
|---|---|---|---|
aws_access_key |
AWS Access Key ID | CRITICAL | AKIA[0-9A-Z]{16} |
aws_secret_key |
AWS Secret Access Key | CRITICAL | aws_secret_access_key = "..." |
azure_connection |
Azure connection string | CRITICAL | DefaultEndpointsProtocol=https;... |
gcp_api_key |
GCP API Key | HIGH | AIza[0-9A-Za-z\-_]{35} |
gcp_service_account |
GCP service account key | CRITICAL | "type": "service_account"..."private_key" |
github_token |
GitHub personal access token | CRITICAL | ghp_[A-Za-z0-9_]{36} |
github_oauth |
GitHub OAuth token | CRITICAL | gho_[A-Za-z0-9_]{36} |
ssh_private_key |
SSH RSA private key | CRITICAL | -----BEGIN RSA PRIVATE KEY----- |
openssh_private_key |
OpenSSH private key | CRITICAL | -----BEGIN OPENSSH PRIVATE KEY----- |
pgp_private_key |
PGP private key | CRITICAL | -----BEGIN PGP PRIVATE KEY BLOCK----- |
private_secret_env |
Private environment variable | CRITICAL | secrets.*PRIVATE.* |
db_password |
Database password | HIGH | db_password = "..." |
Any detection of a CRITICAL severity pattern will cause the private-credential-scan job to FAIL and block the PR.
Cause: The base branch doesn't exist in local git history.
Fix:
# Ensure base branch is available
git fetch origin community # or minimal, develop, etc.
git log origin/community --oneline | head -5 # Verify it's fetched
# Re-push the PR or manually retry the workflowCause: The .gitmodules configuration is correct, but the actual checkout command doesn't use shallow mode.
Fix:
# When manually checking out, use:
git clone --recurse-submodules --depth 1 <repo>
# Or explicitly disable private plugins:
git config submodule.plugins/themisdb_ethic_ai.update !true
git submodule update --init --depth 1Cause: The documentation legitimately contains example credentials for illustration.
Fix:
# Ensure examples use obviously fake credentials:
# GOOD: AKIA0000000000000000 (obviously fake format)
# GOOD: ghp_0000000000000000000000000000000000 (zero-padded)
# BAD: ****** (could be real)
# Update documentation to use sanitized examples
# Then add to allow-list with approval (see Option B above)Before committing code to community/minimal branches:
- No AWS keys, Azure keys, or GCP keys in code
- No GitHub/OAuth tokens or PATs in code
- No SSH or PGP private keys in repository
- No hardcoded database passwords
- No references to private environment variables (secrets.PRIVATE)
- All
.gitmodulesentries for private plugins haveshallow = true - All Wave-1 private plugin submodules have commit pins in
.gitmodules - PR body includes security rotation notice if any credentials were modified
If a gate failure cannot be resolved by following this procedure:
- Consult RELEASE_STRATEGY.md Β§2.3 for gate policy
- Contact the security team if credential leakage is suspected
- Request human waiver via PR comments with justification
- Document the waiver in the High Exception Record section of the PR body
- Schedule post-merge audit to ensure compliance is restored
-
.github/workflows/ci-pr-gates.ymlβ Gate implementation -
.github/workflows/governance-gates.ymlβ Release gate (SBOM verification) -
BRANCHING_STRATEGY.mdβ Branch organization and protection -
RELEASE_STRATEGY.mdβ Release workflow and gates -
DOCUMENTATION_GOVERNANCE.mdβ Governance framework
ThemisDB 1.9.0-beta Β· Home Β· Module-Index Β· GitHub Β· Issues
ThemisDB 1.9.0-beta Β· Home Β· Wiki-Index Β· Module-Index Β· FAQ Β· Quick-Reference Β· GitHub Β· Issues Β· Discussions Β· License
- Batch Operations
- Best Practices
- CRUD Tutorial
- Custom Document Ingestion
- Getting Started Tutorial
- Interactive Examples
- Schema Design
- Video Tutorials
- AQL Reference
- AQL Examples
- AQL Overview
- AQL Feature Roadmap
- AQL Geospatial Guide
- AQL LLM Migration Guide
- AQL API
- AQL Grammar (EBNF)
- AQL Root Overview
- AQL Examples (root)
- API Reference
- API Module README
- OpenAPI Overview
- Client SDK Overview
- SDK Overview
- Operations
- Operations Overview
- Operations Runbook
- Operations Handbook
- ThemisCtl Admin Guide
- Pipeline E2E SOPs
- Deploy Overview
- Docker Overview
- Docker Hub README
- Helm Overview
- Packaging Overview
- Operator Overview
- Security Policy
- Production Hardening Checklist
- Security Hardening Guide
- Encryption Key Management
- Access Control Framework
- Zero Trust Policy
- API Authentication & Authorization
- HSM Production Setup
- PKCS11 Integration
- DSGVO / SOC2 Checklist
- Access Model Runbooks
- Access Model Dashboard
- Maturity Automation Runbook
- Access Review Automation
- Access Model Dashboard
- Access Model Runbooks
- Rights Revocation
- Dr Checklists
- Dr Testing
- Incident Response Playbook
- Incident Response Testing
- GPU Oom Recovery
- Grammar Debugging
- Metrics Scrape Troubleshooting
- Model Swap Procedure
- Quota Tuning
- Subagent Deployment
- Logging Configuration
- Content Model
- Crypto & Keys
- Feature Flags Reference
- Modular Architecture Roadmap
- Modularization Guide
- Module Architecture Index
- PostgreSQL Wire Protocol
- Query Scheduling
- Raft Consensus Design
- Resource Pooling
- Source Directory Guide
- Unified Access Model
- E1 001 Layered Retrieval Design
- E1 002 Ann Abstraction Strategy
- E1 003 Tensor Summary Types
- E1 004 Lora Package Distinction
- E1 005 Model Switch Compatibility
- E1 006 Federated Tensor Summaries
- E2 001 Evaluation Framework Design
- E2 002 Hardware Profile Strategy
- E2 003 Query Planner Routing Model
- E2 004 Approximation Governance Rules
- E2 005 Cross Layer Fallback Confidence Policy
- E3 001 Distributed Tensor Design
- E3 002 Manifest Coordination Strategy
- E3 003 Recovery And Erasure Choice
- E3 004 Tensor Fabric Infrastructure
- Contributing
- Contributing (root)
- Code of Conduct
- Support
- Maintainers
- CTest Guide
- Build Quick Reference
- Developer Wiki Index
- Build / Test / CI
- Module Index
- Branching Strategy
- Disabled Stub Policy
- Docs PR Policy
- GA Promotion Sign Off
- Github Milestones Setup
- Maturity Claim Verification Checklist
- Maturity Evidence Registry
- Merge Gate Bot Config
- Merge Gate Status Live
- Phase 1 Closure Report
- Phase Closure Policy
- Phase Dependency Graph
- Phase3 Enforcement Runbook
- Plugin Submodule Rollback
- PR Version Targeting
- PR Version Targeting Backfill
- Production Ready 2026 Delivery Plan
- Query Module Status
- Readme
- Release Promotion Gate Policy
- Release Validation Checklist
- Security Module 5671 Evidence Summary
- Sharding P6 Residual Risk Acceptance
- Sourcecode Compliance Governance
- Updates Development Status Sign Off
- Wave C Implementation Complete
- Blob Storage
- Cuda
- Ethics Ai
- Exporters
- Huggingface
- Image Analysis
- Importers
- RPC
- Scraper
- Themisdb Ai Watermark Detector
- User Storage Encrypted
- Chimera Architecture
- Chimera Future
- Chimera Readme
- Chimera Roadmap
- Covina Fastapi Ingestion Architecture
- Covina Fastapi Ingestion Future
- Covina Fastapi Ingestion Roadmap
- Vcc Base Architecture
- Vcc Base Future
- Vcc Base Roadmap
- Vcc Clara Ingestion Architecture
- Vcc Clara Ingestion Future
- Vcc Clara Ingestion Roadmap
- Vcc Veritas Architecture
- Vcc Veritas Future
- Vcc Veritas Roadmap
- 01 Hello World
- 02 Todo App
- 03 Contact Manager
- 04 Inventory System
- 05 Time Series Monitor
- 06 Graph Social Network
- 07 Vector Search Documents
- 08 Dms Erp System
- 09 Iot Sensor Network
- 10 Drone Image Analysis
- 11 Blog Wiki
- 12 Expense Tracker
- 13 Recipe Manager
- 14 Ecommerce Catalog
- 15 Event Management
- 16 Kanban Board
- 17 Crm
- 18 Realtime Chat
- 19 Recommendation Engine
- 20 Smart Home
- 21 Coding Platform
- 22 AQL Diagram Tool
- 23 Traveling Salesman
- 24 Moral Philosophy Debates
- API Versioning
- Distributed Sharding
- Feedback Plugins
- Geo
- Gnn
- Image Analysis
- Legal Lora Training
- LLM
- Lora Sync
- Migration
- Nlp
- Performance
- Railway
- Replication
- Rope Visualization
- Sample Product Config
- Security
- Client SDK Overview
- Quickstart
- Sdk Enhancements
- Sdk Implementation Summary
- Test Suite Readme
- Go
- Java
- Javascript
- Php
- Python
- Ruby
- Rust
- Typescript
- 01 Grundlegende Operationen
- 02 AQL Queries
- 03 Graph Daten
- 04 Multimodell Anwendung
- 01 Quickstart Guide
- 02 AQL Referenz Kurzuebersicht
- 03 Datenmodellierung Guide
- 04 Uebungsaufgaben
- 05 Best Practices Guide
- Training Documents
- Training Overview
- 01 Einfuehrung Und Uebersicht
- 02 Datenmodelle Und Architektur
- 03 AQL Abfragesprache
- 04 Installation Und Setup
- 05 Anwendungsbeispiele
- Training Presentations
- Dependencies Readme
- Processmonitor Readme
- Themis.admintools.shared Readme
- Themis.aqlquerybuilder Readme
- Themis.aqlquerybuilder Roadmap
- Themis.auditlogviewer Readme
- Themis.auditlogviewer Roadmap
- Themis.classificationdashboard Readme
- Themis.classificationdashboard Roadmap
- Themis.compliancereports Readme
- Themis.compliancereports Roadmap
- Themis.gisviewer.controlpanel Readme
- Themis.gisviewer.controlpanel Roadmap
- Themis.impactanalysisviewer Readme
- Themis.impactanalysisviewer Roadmap
- Themis.ingestiontool Readme
- Themis.ingestiontool Roadmap
- Themis.keyrotationdashboard Readme
- Themis.keyrotationdashboard Roadmap
- Themis.piimanager Readme
- Themis.piimanager Roadmap
- Themis.retentionmanager Readme
- Themis.retentionmanager Roadmap
- Themis.sagaverifier Readme
- Themis.sagaverifier Roadmap
- Themis.usbadmintool Readme
- Themis.usbadmintool Roadmap
- CI Readme
- CI Roadmap
- Compiler Diagnostics Readme
- Compiler Diagnostics Roadmap
- Completion Readme
- Copilot Ollama Router Readme
- Copilot Ollama Router Roadmap
- Gnn Readme
- Gnn Roadmap
- Rope Visualizer Readme
- Rope Visualizer Roadmap
- Tco Calculator Readme
- Tco Calculator Roadmap
- Tests Readme
- Tests Roadmap
- Themis Config Wx Readme
- Themis Docs Builder Readme
- Wikipedia Ingestion Readme