Skip to content

Commit 24d0ea6

Browse files
Merge branch 'main' into claude/polysafe-gitfixer-01EqWNatioYDiE4ATbYBBbgr
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
2 parents 95b61c5 + 27dc52e commit 24d0ea6

8 files changed

Lines changed: 243 additions & 115 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Custom issue template
3+
about: Describe this issue template's purpose here.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"

.github/workflows/codeql.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
branches: [ "main" ]
19+
schedule:
20+
- cron: '15 14 * * 3'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
permissions:
32+
# required for all workflows
33+
security-events: write
34+
35+
# required to fetch internal or private CodeQL packs
36+
packages: read
37+
38+
# only required for workflows in private repositories
39+
actions: read
40+
contents: read
41+
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
include:
46+
- language: actions
47+
build-mode: none
48+
- language: rust
49+
build-mode: none
50+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
51+
# Use `c-cpp` to analyze code written in C, C++ or both
52+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
53+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
54+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
55+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
56+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
57+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
58+
steps:
59+
- name: Checkout repository
60+
uses: actions/checkout@v4
61+
62+
# Add any setup steps before running the `github/codeql-action/init` action.
63+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
64+
# or others). This is typically only required for manual builds.
65+
# - name: Setup runtime (example)
66+
# uses: actions/setup-example@v1
67+
68+
# Initializes the CodeQL tools for scanning.
69+
- name: Initialize CodeQL
70+
uses: github/codeql-action/init@v4
71+
with:
72+
languages: ${{ matrix.language }}
73+
build-mode: ${{ matrix.build-mode }}
74+
# If you wish to specify custom queries, you can do so here or in a config file.
75+
# By default, queries listed here will override any specified in a config file.
76+
# Prefix the list here with "+" to use these queries and those in the config file.
77+
78+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
79+
# queries: security-extended,security-and-quality
80+
81+
# If the analyze step fails for one of the languages you are analyzing with
82+
# "We were unable to automatically build your code", modify the matrix above
83+
# to set the build mode to "manual" for that language. Then modify this step
84+
# to build your code.
85+
# ℹ️ Command-line programs to run using the OS shell.
86+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
87+
- name: Run manual build steps
88+
if: matrix.build-mode == 'manual'
89+
shell: bash
90+
run: |
91+
echo 'If you are using a "manual" build mode for one or more of the' \
92+
'languages you are analyzing, replace this with the commands to build' \
93+
'your code, for example:'
94+
echo ' make bootstrap'
95+
echo ' make release'
96+
exit 1
97+
98+
- name: Perform CodeQL Analysis
99+
uses: github/codeql-action/analyze@v4
100+
with:
101+
category: "/language:${{matrix.language}}"
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
2+
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["main"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
# Build job
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v5
33+
- name: Build with Jekyll
34+
uses: actions/jekyll-build-pages@v1
35+
with:
36+
source: ./
37+
destination: ./_site
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
41+
# Deployment job
42+
deploy:
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
runs-on: ubuntu-latest
47+
needs: build
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Rust
66
# ==============================================================================
77
target/
8-
# Note: Cargo.lock IS tracked for reproducible Nix builds
8+
Cargo.lock
99
**/*.rs.bk
1010
*.pdb
1111

@@ -68,11 +68,6 @@ result
6868
result-*
6969
.direnv/
7070

71-
# Local Nix shell directories (created by shellHook)
72-
.nix-mix/
73-
.nix-hex/
74-
.cabal/
75-
7671
# ==============================================================================
7772
# Editor/IDE
7873
# ==============================================================================

SECURITY.md

Lines changed: 11 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -2,118 +2,20 @@
22

33
## Supported Versions
44

5+
Use this section to tell people about which versions of your project are
6+
currently being supported with security updates.
7+
58
| Version | Supported |
69
| ------- | ------------------ |
7-
| 0.1.x | :white_check_mark: |
10+
| 5.1.x | :white_check_mark: |
11+
| 5.0.x | :x: |
12+
| 4.0.x | :white_check_mark: |
13+
| < 4.0 | :x: |
814

915
## Reporting a Vulnerability
1016

11-
We take security vulnerabilities seriously. If you discover a security issue,
12-
please report it responsibly.
13-
14-
### How to Report
15-
16-
1. **Preferred Method**: Open a confidential security issue on GitLab
17-
- Go to Issues → New Issue → Check "This issue is confidential"
18-
19-
2. **Email**: Send details to the maintainers listed in MAINTAINERS.md
20-
- Include "SECURITY" in the subject line
21-
- Use PGP encryption if available
22-
23-
3. **Do NOT**:
24-
- Open public issues for security vulnerabilities
25-
- Disclose the vulnerability publicly before it's fixed
26-
- Exploit the vulnerability beyond proof-of-concept
27-
28-
### What to Include
29-
30-
- Description of the vulnerability
31-
- Steps to reproduce
32-
- Potential impact assessment
33-
- Suggested fix (if any)
34-
- Your contact information for follow-up
35-
36-
### Response Timeline
37-
38-
| Severity | Acknowledgment | Target Resolution |
39-
|----------|----------------|-------------------|
40-
| Critical | 4 hours | 24 hours |
41-
| High | 12 hours | 72 hours |
42-
| Medium | 24 hours | 1 week |
43-
| Low | 48 hours | 1 month |
44-
45-
### Severity Classification
46-
47-
- **Critical**: Remote code execution, data corruption, privilege escalation
48-
- **High**: Path traversal, audit log tampering, authentication bypass
49-
- **Medium**: Information disclosure, denial of service
50-
- **Low**: Minor information leaks, documentation issues
51-
52-
## Security Design
53-
54-
polysafe-gitfixer is designed with security as a primary concern:
55-
56-
### Type-Safe Languages
57-
58-
All core components use memory-safe, type-safe languages:
59-
- **Rust**: Memory safety without garbage collection
60-
- **Haskell**: Strong static typing, totality checking
61-
- **Elixir/OTP**: Process isolation, fault tolerance
62-
- **Idris**: Dependent types for correctness proofs
63-
64-
### Capability-Based Security
65-
66-
The `capability` crate implements:
67-
- **Path Traversal Prevention**: All filesystem access goes through `DirCapability`
68-
- **Unforgeable Tokens**: Capabilities cannot be forged or escalated
69-
- **Principle of Least Privilege**: Capabilities grant minimum required access
70-
71-
### Audit Logging
72-
73-
- **Hash-Chained Log**: Each entry includes SHA-256 hash of previous entry
74-
- **Tamper Evidence**: Any modification breaks the chain
75-
- **Append-Only**: Log entries cannot be modified or deleted
76-
77-
### Transactional Operations
78-
79-
- **RAII Cleanup**: Resources freed automatically on scope exit
80-
- **Atomic Operations**: Write-to-temp, then rename
81-
- **Rollback on Failure**: Incomplete operations are automatically reversed
82-
83-
## Security Practices
84-
85-
### Development
86-
87-
- All code requires review before merge
88-
- Automated security scanning in CI/CD
89-
- Dependency vulnerability monitoring
90-
- SPDX license headers on all source files
91-
92-
### Testing
93-
94-
- Unit tests for security-critical functions
95-
- Property-based testing for edge cases
96-
- Integration tests for capability boundaries
97-
98-
### Dependencies
99-
100-
We minimize dependencies and prefer:
101-
- Well-audited, widely-used libraries
102-
- Libraries with security-focused maintainers
103-
- Pure Rust implementations over C bindings where practical
104-
105-
## Acknowledgments
106-
107-
We maintain a security acknowledgments list for responsible disclosures.
108-
Reporters may choose to be credited publicly or remain anonymous.
109-
110-
## Contact
111-
112-
For security questions that don't involve vulnerabilities, you may:
113-
- Open a regular issue with the "security-question" label
114-
- Ask in project discussions
115-
116-
---
17+
Use this section to tell people how to report a vulnerability.
11718

118-
This security policy follows [RFC 9116](https://www.rfc-editor.org/rfc/rfc9116) guidelines.
119-
See `.well-known/security.txt` for machine-readable security contact information.
19+
Tell them where to go, how often they can expect to get an update on a
20+
reported vulnerability, what to expect if the vulnerability is accepted or
21+
declined, etc.

0 commit comments

Comments
 (0)