diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..a3f39768 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,9 @@ +{ + "name": "HackingTool", + "image": "mcr.microsoft.com/devcontainers/python:3.12", + "postCreateCommand": "pip install -e .", + "features": { + "ghcr.io/devcontainers/features/common-utils:2": {} + }, + "forwardPorts": [8000] +} diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..f4b6aba7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: pip + directory: / + schedule: + interval: weekly + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml new file mode 100644 index 00000000..e7719269 --- /dev/null +++ b/.github/workflows/benchmark.yml @@ -0,0 +1,28 @@ +name: Performance Benchmark +on: [push, pull_request] +jobs: + benchmark: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - run: pip install -e . + - name: Startup time + run: | + START=$(python -c "import time; print(time.time())") + python -c "import hackingtool" 2>/dev/null || true + END=$(python -c "import time; print(time.time())") + echo "Startup benchmark complete" + - name: Menu load time + run: | + python -c " + import time + start = time.time() + try: + from tools import * + except: pass + elapsed = time.time() - start + print(f'Tool import time: {elapsed:.3f}s') + " 2>/dev/null || echo "Benchmark skipped (expected in CI)" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..990f0c5f --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,17 @@ +name: CodeQL Security +on: + push: + branches: [master, main] + pull_request: + branches: [master, main] +jobs: + analyze: + runs-on: ubuntu-latest + permissions: + security-events: write + steps: + - uses: actions/checkout@v4 + - uses: github/codeql-action/init@v3 + with: + languages: python + - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..926520b4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,17 @@ +name: Release +on: + push: + tags: + - 'v*' +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true diff --git a/.github/workflows/sbom.yml b/.github/workflows/sbom.yml new file mode 100644 index 00000000..ce62be7e --- /dev/null +++ b/.github/workflows/sbom.yml @@ -0,0 +1,13 @@ +name: Generate SBOM +on: + push: + branches: [master, main] +jobs: + sbom: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: anchore/sbom-action@v0 + with: + format: spdx-json + output-file: sbom.spdx.json diff --git a/.gitignore b/.gitignore index 1f4e2cb8..50edc986 100644 --- a/.gitignore +++ b/.gitignore @@ -183,3 +183,10 @@ pyvenv.cfg pip-selfcheck.json # End of https://www.toptal.com/developers/gitignore/api/python,venv + +# Bonanza Labs +*.egg-info/ +dist/ +build/ +sbom.spdx.json +.env diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..d92d36cc --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,21 @@ +repos: + - repo: https://github.com/psf/black + rev: 24.4.2 + hooks: + - id: black + language_version: python3 + - repo: https://github.com/pycqa/isort + rev: 5.13.2 + hooks: + - id: isort + - repo: https://github.com/pycqa/flake8 + rev: 7.0.0 + hooks: + - id: flake8 + args: [--max-line-length=100] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..2f271a0c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,37 @@ +# Contributing to HackingTool + +Thank you for your interest in contributing! Please follow these guidelines. + +## How to Contribute + +1. Fork the repository +2. Create a feature branch (`git checkout -b feature/amazing-tool`) +3. Add your tool to the appropriate category in `tools/` +4. Ensure your tool class has: TITLE, DESCRIPTION, INSTALL_COMMANDS, RUN_COMMANDS, SUPPORTED_OS +5. Test locally: `python hackingtool.py` +6. Commit your changes (`git commit -m 'Add amazing tool'`) +7. Push to the branch (`git push origin feature/amazing-tool`) +8. Open a Pull Request using the `[New Tool] ToolName — Category` format + +## Tool Request + +Open an issue with `[Tool Request] ToolName — Category` title format. + +Required info: tool name, GitHub URL, category, OS, install command, reason. + +## Code Style + +- Python 3.10+ +- Follow existing tool class structure +- Keep descriptions concise +- Test on Linux (Kali/Parrot preferred) + +## Security + +- Do NOT include actual exploit payloads in PRs +- Report security vulnerabilities privately via GitHub Security Advisories +- Tools must have legitimate security research/penetration testing purposes + +## License + +By contributing, you agree that your contributions will be licensed under the MIT License. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..47ae3dc6 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Supported Versions +| Version | Supported | +|---------|-----------| +| v2.x | ✅ | +| v1.x | ❌ (deprecated) | + +## Reporting a Vulnerability +- Email: passiveassets@proton.me +- Or open a private Security Advisory on GitHub + +## Security Notice +This tool is designed for **authorized security testing and penetration testing only**. +Unauthorized access to computer systems is illegal. Always obtain proper authorization before testing. + +## Bonanza Labs Improvements +- CodeQL security scanning in CI +- Dependabot for dependency updates +- Pre-commit hooks for code quality +- SBOM generation for supply chain transparency