Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Thumbs.db
/.elixir_ls/

# Rust
**/target/
# Cargo.lock # Keep for binaries

# Elixir
Expand Down
11 changes: 8 additions & 3 deletions ECOSYSTEM.scm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(version "1.0.0")
(name "polysafe-gitfixer")
(type "project")
(purpose "// SPDX-License-Identifier: MIT AND Palimpsest-0.8")
(purpose "Polyglot git backup merger with maximum safety guarantees - scans directory trees for git repos, finds backup directories, offers interactive merge/replace/delete operations with capability-based security and append-only audit logging.")

(position-in-ecosystem
"Part of hyperpolymath ecosystem. Follows RSR guidelines.")
Expand All @@ -16,5 +16,10 @@
(url "https://github.com/hyperpolymath/rhodium-standard-repositories")
(relationship "standard")))

(what-this-is "// SPDX-License-Identifier: MIT AND Palimpsest-0.8")
(what-this-is-not "- NOT exempt from RSR compliance"))
(what-this-is
"A safety-first tool for reconciling git repositories with their backups, using Rust for core operations, Haskell for diffing, Elixir for orchestration, and Idris for verified workflows.")

(what-this-is-not
"- NOT exempt from RSR compliance
- NOT a general-purpose backup tool
- NOT a replacement for git itself"))
76 changes: 65 additions & 11 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,74 @@

## Supported Versions

Use this section to tell people about which versions of your project are
currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 5.1.x | :white_check_mark: |
| 5.0.x | :x: |
| 4.0.x | :white_check_mark: |
| < 4.0 | :x: |
| 0.1.x | :white_check_mark: |

## Reporting a Vulnerability

Use this section to tell people how to report a vulnerability.
We take the security of polysafe-gitfixer seriously. If you believe you have found a security vulnerability, please report it responsibly.

### Where to Report

**Preferred**: Create a confidential issue at [GitLab Security Issue](https://gitlab.com/Hyperpolymath/polysafe-gitfixer/-/issues/new?issuable_template=security)

**Alternative**: Email the maintainer at the address listed in MAINTAINERS.md

### What to Include

- Type of vulnerability (e.g., path traversal, audit log tampering, capability bypass)
- Full paths of affected source files
- Step-by-step instructions to reproduce
- Proof-of-concept code if possible
- Impact assessment

### Response Timeline

- **Initial Response**: Within 72 hours
- **Status Update**: Within 7 days
- **Resolution Target**: Within 30 days (depending on severity and complexity)

### What to Expect

1. **Acknowledgment**: We will confirm receipt of your report
2. **Investigation**: We will investigate and determine the impact
3. **Fix Development**: A fix will be developed and tested
4. **Coordinated Disclosure**: We will coordinate disclosure timing with you
5. **Credit**: You will be credited in the security advisory (unless you prefer anonymity)

## Security Measures

This project implements the following security measures:

### Cryptographic Standards
- **SHA-256 only** for hash chains and integrity verification
- No MD5 or SHA1 for security purposes
- Ring library for cryptographic primitives

### Path Safety
- Capability-based path access control
- Path traversal prevention via canonicalization
- Symlink escape detection
- Subcapability permission restriction

### Audit Logging
- Append-only audit logs with hash chain integrity
- Tamper detection via chain verification
- fsync durability guarantees

### CI/CD Security
- CodeQL static analysis
- TruffleHog credential scanning
- OSSF Scorecard monitoring
- SHA-pinned GitHub Actions

## Security.txt

This repository follows RFC 9116. See `.well-known/security.txt` for machine-readable security contact information.

## Acknowledgments

We thank the following individuals for responsibly disclosing security issues:

Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.
_(None yet - be the first!)_
136 changes: 128 additions & 8 deletions STATE.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,140 @@
;; SPDX-FileCopyrightText: 2025 Jonathan D.A. Jewell

(define metadata
'((version . "0.1.0") (updated . "2025-12-15") (project . "polysafe-gitfixer")))
'((version . "0.1.0")
(updated . "2025-12-17")
(project . "polysafe-gitfixer")))

(define current-position
'((phase . "v0.1 - Initial Setup")
(overall-completion . 25)
(components ((rsr-compliance ((status . "complete") (completion . 100)))))))
'((phase . "v0.1 - Foundation Complete")
(overall-completion . 35)
(components
((rust-capability
((status . "complete")
(completion . 100)
(tests . 12)
(features . ("SHA-256 hash chains" "path traversal prevention" "capability tokens" "audit logging"))))
(rust-fs-ops
((status . "complete")
(completion . 100)
(tests . 9)
(features . ("transactional operations" "atomic commits" "rollback on failure" "RAII cleanup"))))
(rust-git-ops
((status . "complete")
(completion . 100)
(tests . 7)
(features . ("repo discovery" "status checking" "staging" "remote URL handling"))))
(rust-nifs
((status . "complete")
(completion . 100)
(notes . "Rustler bindings ready for Elixir integration")))
(nickel-config
((status . "complete")
(completion . 100)
(features . ("type-safe schema" "default values" "safety settings"))))
(haskell-diff-engine
((status . "planned")
(completion . 0)
(priority . "high")))
(haskell-tui
((status . "planned")
(completion . 0)
(priority . "medium")))
(elixir-orchestrator
((status . "planned")
(completion . 0)
(priority . "high")))
(idris-workflow
((status . "planned")
(completion . 0)
(priority . "low")
(fallback . "Haskell typestate")))
(rsr-compliance
((status . "complete")
(completion . 100)))))))

(define blockers-and-issues '((critical ()) (high-priority ())))
(define blockers-and-issues
'((critical ())
(high-priority ())
(resolved
(("SECURITY.md template" . "2025-12-17")
("ECOSYSTEM.scm placeholder content" . "2025-12-17")))))

(define roadmap
'((v0.1-foundation
((status . "complete")
(milestone . "Initial Setup")
(deliverables
("RSR compliance" "Rust crates" "CI/CD pipelines" "Security workflows" "Nickel configuration"))))
(v0.2-diff-engine
((status . "next")
(milestone . "Diff Engine")
(deliverables
("Haskell diff-engine crate"
"Tree diffing with streaming"
"File-level delta computation"
"Binary file detection"
"Integration with Rust crates via FFI or JSON RPC"))))
(v0.3-elixir-orchestration
((status . "planned")
(milestone . "OTP Orchestration")
(deliverables
("Elixir mix project"
"Rustler NIF integration"
"GenServer supervision tree"
"Concurrent repo scanning"
"Failure recovery"))))
(v0.4-tui
((status . "planned")
(milestone . "Terminal UI")
(deliverables
("Brick-based TUI"
"Elm Architecture events"
"Interactive diff viewer"
"Merge/replace/delete dialogs"
"Progress indicators"))))
(v0.5-workflow
((status . "planned")
(milestone . "Verified Workflow")
(deliverables
("Idris 2 typestate machine"
"OR Haskell typestate fallback"
"Illegal state prevention at compile time"
"Operation sequencing guarantees"))))
(v1.0-release
((status . "planned")
(milestone . "Production Release")
(deliverables
("Full integration"
"Documentation"
"Installation packages"
"Performance optimization"
"Security audit"))))))

(define critical-next-actions
'((immediate (("Verify CI/CD" . high))) (this-week (("Expand tests" . medium)))))
'((immediate
(("Implement Haskell diff-engine" . high)
("Set up Elixir mix project" . high)))
(this-week
(("Define FFI interface between Haskell and Rust" . medium)
("Add integration tests" . medium)))
(backlog
(("Idris 2 workflow (or Haskell fallback)" . low)
("Brick TUI prototype" . medium)))))

(define session-history
'((snapshots ((date . "2025-12-15") (session . "initial") (notes . "SCM files added")))))
'((snapshots
((date . "2025-12-15")
(session . "initial")
(notes . "SCM files added"))
((date . "2025-12-17")
(session . "security-review")
(notes . "SECURITY.md completed, ECOSYSTEM.scm fixed, roadmap updated, all tests passing")))))

(define state-summary
'((project . "polysafe-gitfixer") (completion . 25) (blockers . 0) (updated . "2025-12-15")))
'((project . "polysafe-gitfixer")
(completion . 35)
(blockers . 0)
(tests-passing . 30)
(next-milestone . "v0.2 Diff Engine")
(updated . "2025-12-17")))
Loading