Skip to content

Commit ee01f90

Browse files
committed
docs: Align documentation style with qramm-cryptoscan
- Rewrite README.md with improved structure and visual appeal - Add tagline and one-liner mission statement - Add Go Version badge and quick navigation links - Add comparison table and collapsible details - Add "Try It Out" demo section - Add Roadmap with version checkboxes - Update About CSNP and References sections - Add PATTERNS.md documenting detection patterns - Quantum risk classification tables - Algorithm classifications by category - Import patterns by ecosystem (Go, npm, Python, Maven) - Instructions for adding new patterns - Update CONTRIBUTING.md with cleaner structure - Add PATTERNS.md reference - Add security vulnerability reporting - Add PR guidelines and checklist - Fix release workflow - Disable cosign signing until properly configured - Prevents release failures from missing cosign binary - Update .gitignore for internal docs
1 parent 91c5731 commit ee01f90

File tree

6 files changed

+713
-480
lines changed

6 files changed

+713
-480
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ jobs:
4242
username: ${{ github.actor }}
4343
password: ${{ secrets.GITHUB_TOKEN }}
4444

45-
- name: Install Cosign
46-
uses: sigstore/cosign-installer@v3
45+
# TODO: Re-enable cosign signing once properly configured
46+
# - name: Install Cosign
47+
# uses: sigstore/cosign-installer@v3
4748

4849
- name: Run GoReleaser
4950
uses: goreleaser/goreleaser-action@v6

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Binaries (only in root)
1+
# Binaries
22
/cryptodeps
33
*.exe
44
*.exe~
@@ -38,3 +38,9 @@ Thumbs.db
3838

3939
# Downloaded package sources (cache)
4040
.cache/
41+
42+
# GoReleaser
43+
dist/
44+
45+
# Internal roadmap and planning docs
46+
ROADMAP.md

.goreleaser.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -163,17 +163,18 @@ release:
163163
extra_files:
164164
- glob: ./data/crypto-database.json
165165

166-
# Sign releases
167-
signs:
168-
- cmd: cosign
169-
env:
170-
- COSIGN_EXPERIMENTAL=1
171-
certificate: '${artifact}.pem'
172-
args:
173-
- sign-blob
174-
- '--output-certificate=${certificate}'
175-
- '--output-signature=${signature}'
176-
- '${artifact}'
177-
- '--yes'
178-
artifacts: checksum
179-
output: true
166+
# TODO: Enable cosign signing once properly configured
167+
# Sign releases with cosign
168+
# signs:
169+
# - cmd: cosign
170+
# env:
171+
# - COSIGN_EXPERIMENTAL=1
172+
# certificate: '${artifact}.pem'
173+
# args:
174+
# - sign-blob
175+
# - '--output-certificate=${certificate}'
176+
# - '--output-signature=${signature}'
177+
# - '${artifact}'
178+
# - '--yes'
179+
# artifacts: checksum
180+
# output: true

CONTRIBUTING.md

Lines changed: 90 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to CryptoDeps
22

3-
Thank you for your interest in contributing to CryptoDeps. This document provides guidelines for contributing to the project.
3+
Thank you for your interest in contributing to CryptoDeps! This document provides guidelines for contributing to the project.
44

55
## Getting Started
66

@@ -14,9 +14,9 @@ Thank you for your interest in contributing to CryptoDeps. This document provide
1414
```bash
1515
git clone https://github.com/csnp/qramm-cryptodeps.git
1616
cd qramm-cryptodeps
17-
make deps
18-
make build
19-
make test
17+
go mod download
18+
go build -o cryptodeps ./cmd/cryptodeps
19+
go test ./...
2020
```
2121

2222
## Development Workflow
@@ -25,32 +25,34 @@ make test
2525

2626
```bash
2727
# Run all tests
28-
make test
28+
go test -race ./...
2929

3030
# Run tests without race detector (faster)
31-
make test-short
31+
go test ./...
3232

3333
# View coverage report
34-
make coverage
34+
go test -coverprofile=coverage.out ./...
35+
go tool cover -html=coverage.out
3536
```
3637

3738
### Code Style
3839

3940
```bash
4041
# Format code
41-
make fmt
42+
go fmt ./...
43+
gofumpt -w .
4244

4345
# Run linter
44-
make lint
46+
golangci-lint run
4547
```
4648

4749
## Contributing Code
4850

4951
1. Fork the repository
5052
2. Create a feature branch: `git checkout -b feature/my-feature`
5153
3. Make your changes
52-
4. Run tests: `make test`
53-
5. Run linter: `make lint`
54+
4. Run tests: `go test -race ./...`
55+
5. Run linter: `golangci-lint run`
5456
6. Commit with a descriptive message
5557
7. Push and open a Pull Request
5658

@@ -63,6 +65,7 @@ feat: add support for Cargo.toml
6365
fix: correct SHA-384 classification
6466
docs: update installation instructions
6567
test: add tests for npm parser
68+
refactor: improve reachability analysis performance
6669
```
6770

6871
## Contributing Package Data
@@ -75,29 +78,63 @@ Help expand the crypto knowledge database by contributing analysis for packages
7578
# Scan a project and identify unknown packages
7679
cryptodeps analyze /path/to/project --deep
7780

78-
# Look for "not in database" warnings
81+
# Look for packages marked as "unknown" or "low confidence"
7982
```
8083

8184
### Submitting Package Data
8285

8386
1. Analyze the package source code to identify crypto usage
84-
2. Create a YAML entry following the schema in `data/packages/`
87+
2. Create a JSON entry following the schema below
8588
3. Submit a Pull Request with the new package data
8689

8790
### Package Entry Format
8891

89-
```yaml
90-
name: "package-name"
91-
ecosystem: "go" # go, npm, pypi, maven
92-
crypto:
93-
- algorithm: "RSA"
94-
type: "asymmetric"
95-
quantumRisk: "vulnerable"
96-
usage: "Key exchange"
97-
file: "crypto.go"
98-
evidence: "Uses crypto/rsa package"
92+
Add entries to `data/crypto-database.json`:
93+
94+
```json
95+
{
96+
"name": "package-name",
97+
"ecosystem": "go",
98+
"crypto": [
99+
{
100+
"algorithm": "RSA",
101+
"type": "asymmetric",
102+
"quantumRisk": "vulnerable",
103+
"usage": "Key exchange",
104+
"file": "crypto.go",
105+
"evidence": "Uses crypto/rsa package",
106+
"confidence": "high"
107+
}
108+
]
109+
}
99110
```
100111

112+
**Ecosystem values**: `go`, `npm`, `pypi`, `maven`
113+
114+
**quantumRisk values**: `vulnerable`, `partial`, `safe`
115+
116+
**confidence values**: `verified`, `high`, `medium`, `low`
117+
118+
## Adding Detection Patterns
119+
120+
### Import Patterns
121+
122+
Add new import patterns in `pkg/crypto/patterns.go`:
123+
124+
```go
125+
{Pattern: "new/crypto/package", Ecosystem: types.EcosystemGo, Description: "Description", Algorithms: []string{"RSA", "AES"}},
126+
```
127+
128+
### Algorithm Classifications
129+
130+
Add new algorithms in `pkg/crypto/quantum.go`:
131+
132+
```go
133+
"new-algorithm": {Name: "New-Algorithm", Type: "encryption", QuantumRisk: types.RiskSafe, Severity: types.SeverityInfo, Description: "Description", Remediation: "Guidance"},
134+
```
135+
136+
See [PATTERNS.md](PATTERNS.md) for the complete list of current patterns.
137+
101138
## Reporting Issues
102139

103140
### Bug Reports
@@ -107,7 +144,7 @@ Include:
107144
- Operating system and architecture
108145
- Steps to reproduce
109146
- Expected vs actual behavior
110-
- Relevant manifest file (sanitized)
147+
- Relevant manifest file (sanitized of sensitive data)
111148

112149
### Feature Requests
113150

@@ -116,6 +153,34 @@ Describe:
116153
- Your proposed solution
117154
- Alternatives you've considered
118155

156+
### Security Vulnerabilities
157+
158+
For security issues, please email security@csnp.org instead of opening a public issue.
159+
160+
## Pull Request Guidelines
161+
162+
### Before Submitting
163+
164+
- [ ] Tests pass: `go test -race ./...`
165+
- [ ] Linter passes: `golangci-lint run`
166+
- [ ] Code is formatted: `go fmt ./...`
167+
- [ ] Documentation updated if needed
168+
- [ ] Commit messages follow conventional commits
169+
170+
### PR Description
171+
172+
Include:
173+
- Summary of changes
174+
- Motivation and context
175+
- Testing performed
176+
- Screenshots (if UI changes)
177+
178+
### Review Process
179+
180+
1. All PRs require at least one review
181+
2. CI must pass before merge
182+
3. Squash commits on merge for clean history
183+
119184
## Code of Conduct
120185

121186
Be respectful and constructive. We're all here to improve quantum security.
@@ -124,7 +189,7 @@ Be respectful and constructive. We're all here to improve quantum security.
124189

125190
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.
126191

127-
## Questions
192+
## Questions?
128193

129194
- Open an issue for questions
130195
- Visit [QRAMM.org](https://qramm.org) for quantum readiness resources

0 commit comments

Comments
 (0)