|
| 1 | +# Contributing to CryptoDeps |
| 2 | + |
| 3 | +Thank you for your interest in contributing to CryptoDeps. This document provides guidelines for contributing to the project. |
| 4 | + |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +### Prerequisites |
| 8 | + |
| 9 | +- Go 1.21 or later |
| 10 | +- Git |
| 11 | + |
| 12 | +### Setup |
| 13 | + |
| 14 | +```bash |
| 15 | +git clone https://github.com/csnp/qramm-cryptodeps.git |
| 16 | +cd qramm-cryptodeps |
| 17 | +make deps |
| 18 | +make build |
| 19 | +make test |
| 20 | +``` |
| 21 | + |
| 22 | +## Development Workflow |
| 23 | + |
| 24 | +### Running Tests |
| 25 | + |
| 26 | +```bash |
| 27 | +# Run all tests |
| 28 | +make test |
| 29 | + |
| 30 | +# Run tests without race detector (faster) |
| 31 | +make test-short |
| 32 | + |
| 33 | +# View coverage report |
| 34 | +make coverage |
| 35 | +``` |
| 36 | + |
| 37 | +### Code Style |
| 38 | + |
| 39 | +```bash |
| 40 | +# Format code |
| 41 | +make fmt |
| 42 | + |
| 43 | +# Run linter |
| 44 | +make lint |
| 45 | +``` |
| 46 | + |
| 47 | +## Contributing Code |
| 48 | + |
| 49 | +1. Fork the repository |
| 50 | +2. Create a feature branch: `git checkout -b feature/my-feature` |
| 51 | +3. Make your changes |
| 52 | +4. Run tests: `make test` |
| 53 | +5. Run linter: `make lint` |
| 54 | +6. Commit with a descriptive message |
| 55 | +7. Push and open a Pull Request |
| 56 | + |
| 57 | +### Commit Messages |
| 58 | + |
| 59 | +Use conventional commits: |
| 60 | + |
| 61 | +``` |
| 62 | +feat: add support for Cargo.toml |
| 63 | +fix: correct SHA-384 classification |
| 64 | +docs: update installation instructions |
| 65 | +test: add tests for npm parser |
| 66 | +``` |
| 67 | + |
| 68 | +## Contributing Package Data |
| 69 | + |
| 70 | +Help expand the crypto knowledge database by contributing analysis for packages not yet in the database. |
| 71 | + |
| 72 | +### Finding Unknown Packages |
| 73 | + |
| 74 | +```bash |
| 75 | +# Scan a project and identify unknown packages |
| 76 | +cryptodeps analyze /path/to/project --deep |
| 77 | + |
| 78 | +# Look for "not in database" warnings |
| 79 | +``` |
| 80 | + |
| 81 | +### Submitting Package Data |
| 82 | + |
| 83 | +1. Analyze the package source code to identify crypto usage |
| 84 | +2. Create a YAML entry following the schema in `data/packages/` |
| 85 | +3. Submit a Pull Request with the new package data |
| 86 | + |
| 87 | +### Package Entry Format |
| 88 | + |
| 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" |
| 99 | +``` |
| 100 | +
|
| 101 | +## Reporting Issues |
| 102 | +
|
| 103 | +### Bug Reports |
| 104 | +
|
| 105 | +Include: |
| 106 | +- CryptoDeps version (`cryptodeps version`) |
| 107 | +- Operating system and architecture |
| 108 | +- Steps to reproduce |
| 109 | +- Expected vs actual behavior |
| 110 | +- Relevant manifest file (sanitized) |
| 111 | + |
| 112 | +### Feature Requests |
| 113 | + |
| 114 | +Describe: |
| 115 | +- The problem you're trying to solve |
| 116 | +- Your proposed solution |
| 117 | +- Alternatives you've considered |
| 118 | + |
| 119 | +## Code of Conduct |
| 120 | + |
| 121 | +Be respectful and constructive. We're all here to improve quantum security. |
| 122 | + |
| 123 | +## License |
| 124 | + |
| 125 | +By contributing, you agree that your contributions will be licensed under the Apache License 2.0. |
| 126 | + |
| 127 | +## Questions |
| 128 | + |
| 129 | +- Open an issue for questions |
| 130 | +- Visit [QRAMM.org](https://qramm.org) for quantum readiness resources |
| 131 | +- Contact [CSNP](https://csnp.org) for organizational inquiries |
0 commit comments