wget yang punya otak keamanan โ download + verify + trust analysis
Project description
๐ TrustGet
wget yang punya otak keamanan.
TrustGet = download + verify + trust analysis โ satu perintah, nol drama.
Built for: SysAdmin ยท DevOps ยท Homelab ยท Linux Dev
โจ Features
- ๐ Smart Download โ Streaming download with progress bar, resume support, and retry logic
- ๐ Auto Verification โ Automatically finds and verifies SHA256/SHA512/MD5 checksums
- ๐ฏ GitHub Smart Mode โ Zero-config security for GitHub Releases
- ๐ Trust Score โ Transparent 0-100 security scoring with explainable factors
- ๐งช Sandbox Execution โ Run downloaded files in isolated environment
- ๐ฆ Zero Config โ Works out of the box, no setup required
๐ Quick Start
Installation
From PyPI (Recommended)
pip install trustget
From apt (Debian/Ubuntu)
# Download the .deb package from releases
wget https://github.com/FaturRachmann/trustget/releases/latest/download/trustget_0.1.0_all.deb
# Install
sudo apt install ./trustget_0.1.0_all.deb
From Source
git clone https://github.com/FaturRachmann/trustget.git
cd trustget
pip install -e ".[dev]"
Basic Usage
# Download with automatic verification
sg https://github.com/cli/cli/releases/download/v2.40.0/gh_2.40.0_linux_amd64.tar.gz
# Or use the full command
trustget <url>
# Just verify a local file
sg verify ./file.tar.gz
# Check trust score without downloading
sg trust https://example.com/file.tar.gz
# Get release info
sg info https://github.com/user/repo/releases/download/v1.0/file.tar.gz
# Run in sandbox (experimental)
sg run ./AppImage
๐ Commands
| Command | Description |
|---|---|
sg <url> |
Download + verify + trust analysis |
sg verify <file> |
Verify file against checksum |
sg trust <url> |
Analyze trust without download |
sg run <file> |
Execute file in sandbox |
sg info <url> |
Show file/release metadata |
sg config |
Manage configuration |
Global Flags
| Flag | Description |
|---|---|
--json, -j |
Output in JSON format |
--quiet, -q |
Suppress non-essential output |
--verbose, -v |
Enable verbose output |
--no-color |
Disable colored output |
--no-verify |
Skip checksum verification |
--timeout, -t |
HTTP request timeout (default: 30s) |
--retry, -r |
Number of retry attempts (default: 3) |
--force, -f |
Force download even if trust score is low |
๐ Examples
Download from GitHub Releases
$ Trustget https://github.com/cli/cli/releases/download/v2.40.0/gh_2.40.0_linux_amd64.tar.gz
Trustget v0.1.0
Analyzing URL...
โ GitHub Release detected: cli/cli @ v2.40.0
โ Published: 2024-01-15 by maintainer @williammartin
โ Not a pre-release or draft
Downloading gh_2.40.0_linux_amd64.tar.gz
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100% โข 11.2 MB โข 4.2 MB/s โข ETA 0s
Verification
โ SHA256 matched (from gh_2.40.0_checksums.txt)
Expected : 4b49d4ddce8a6d56b67d95f9d99f1e17e5b5c5c
Got : 4b49d4ddce8a6d56b67d95f9d99f1e17e5b5c5c
Security Analysis
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Trust Score 92 / 100 โ LOW RISK โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ HTTPS connection +20 โ
โ โ Checksum verified +25 โ
โ โ Known platform (github.com) +10 โ
โ โ Maintainer verified +20 โ
โ โ Recent release (< 30 days) +10 โ
โ โ Repo age > 1 year +07 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ File saved โ ./gh_2.40.0_linux_amd64.tar.gz
JSON Output for CI/CD
$ Trustget --json https://example.com/file.tar.gz | jq
{
"download": {
"success": true,
"filepath": "/path/to/file.tar.gz",
"size": 1234567
},
"verification": {
"status": "VERIFIED",
"algorithm": "sha256",
"expected_hash": "abc123...",
"actual_hash": "abc123..."
},
"trust": {
"score": 85,
"risk_level": "LOW",
"factors": [...]
}
}
Verify Local File
$ Trustget verify ./file.tar.gz --checksum abc123...
โ SHA256 matched
Expected : abc123...
Got : abc123...
Check Trust Score
$ Trustget trust https://example.com/file.tar.gz
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Trust Score 45 / 100 โ HIGH RISK โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ HTTPS connection +20 โ
โ โ Unknown domain -20 โ
โ โ No checksum found -15 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Security Model
Trust Score Factors
| Factor | Weight | Description |
|---|---|---|
| HTTPS connection | +20 | Secure HTTPS connection |
| Checksum available | +10 | Checksum file found |
| Checksum verified | +25 | Hash verification passed |
| GPG signature | +25 | GPG signature verified |
| Known domain | +10 | Trusted domain (github.com, kernel.org, etc.) |
| Maintainer verified | +20 | Release by repo owner |
| Repo age > 1 year | +7 | Established repository |
| Recent release | +10 | Published < 30 days ago |
| HTTP redirect | -10 | Redirect to different domain |
| Unknown domain | -20 | Untrusted domain |
| No checksum | -15 | No checksum available |
| Repo < 3 months | -20 | New repository |
| Pre-release | -10 | Draft or pre-release version |
Risk Levels
| Score | Level | Action |
|---|---|---|
| < 40 | ๐ด CRITICAL | Abort download |
| 40โ59 | ๐ HIGH | Confirm with user |
| 60โ79 | ๐ก MEDIUM | Proceed with warning |
| 80โ100 | ๐ข LOW | Safe to proceed |
โ๏ธ Configuration
Configuration is stored in ~/.config/Trustget/config.toml:
timeout = 30
retries = 3
verify = true
json_output = false
quiet = false
min_trust_score = 0
Use Trustget config to manage:
# Set a value
Trustget config --set timeout 60
# Get a value
Trustget config --get timeout
# Reset to defaults
Trustget config --reset
๐งช Development
Running Tests
# Install dev dependencies
pip install -e ".[dev]"
# Run all tests
pytest
# Run with coverage
pytest --cov=Trustget
# Run specific test file
pytest tests/unit/test_utils.py
Code Quality
# Lint with ruff
ruff check Trustget/
# Type check with mypy
mypy Trustget/
# Format code
ruff format Trustget/
Build Package
python -m build
twine check dist/*
๐ Project Structure
Trustget/
โโโ Trustget/
โ โโโ __init__.py # Version, public API
โ โโโ cli.py # Click commands
โ โโโ downloader.py # Streaming download
โ โโโ verifier.py # Hash/GPG verification
โ โโโ scanner.py # Checksum file detection
โ โโโ github.py # GitHub API integration
โ โโโ trust.py # Trust score engine
โ โโโ reporter.py # Output formatting
โ โโโ utils.py # Shared utilities
โโโ tests/
โ โโโ unit/
โ โโโ integration/
โ โโโ fixtures/
โโโ docs/
โโโ pyproject.toml
โโโ README.md
โโโ LICENSE
๐ค Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Commit Message Convention
We use Conventional Commits:
feat:New featurefix:Bug fixdocs:Documentation changestest:Test additions or correctionschore:Maintenance tasksrefactor:Code refactoring
๐ License
MIT License โ see LICENSE for details.
๐ Acknowledgments
Inspired by the need for secure downloading in production environments.
Make secure the default, not the exception.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trustget-0.1.0.tar.gz.
File metadata
- Download URL: trustget-0.1.0.tar.gz
- Upload date:
- Size: 363.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96972118e9b211f1ee5920497ab0298b703f690595c53f0fb7b5e54d117915b2
|
|
| MD5 |
861f67716549770a066bdb64db53da67
|
|
| BLAKE2b-256 |
81803c1e0f37869e5d886de7692c123bb31aed7e4b01cc514295f89423e183f9
|
Provenance
The following attestation bundles were made for trustget-0.1.0.tar.gz:
Publisher:
pypi-release.yml on FaturRachmann/trustget
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trustget-0.1.0.tar.gz -
Subject digest:
96972118e9b211f1ee5920497ab0298b703f690595c53f0fb7b5e54d117915b2 - Sigstore transparency entry: 1002372241
- Sigstore integration time:
-
Permalink:
FaturRachmann/trustget@edcda45cb244ee96b5e2f9862417261fe6681c1b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/FaturRachmann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@edcda45cb244ee96b5e2f9862417261fe6681c1b -
Trigger Event:
push
-
Statement type:
File details
Details for the file trustget-0.1.0-py3-none-any.whl.
File metadata
- Download URL: trustget-0.1.0-py3-none-any.whl
- Upload date:
- Size: 33.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
959fe1832a19c9a454a0d29c85a95bc0980dbf5643ba3e971e48d2c41c05186e
|
|
| MD5 |
ab5b3ca753582561c85da562a3a3e27f
|
|
| BLAKE2b-256 |
57e36525a2e2160dffea27f55284b47ee9a1271bbb737ddc7e818cd51a1b9995
|
Provenance
The following attestation bundles were made for trustget-0.1.0-py3-none-any.whl:
Publisher:
pypi-release.yml on FaturRachmann/trustget
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trustget-0.1.0-py3-none-any.whl -
Subject digest:
959fe1832a19c9a454a0d29c85a95bc0980dbf5643ba3e971e48d2c41c05186e - Sigstore transparency entry: 1002372251
- Sigstore integration time:
-
Permalink:
FaturRachmann/trustget@edcda45cb244ee96b5e2f9862417261fe6681c1b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/FaturRachmann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@edcda45cb244ee96b5e2f9862417261fe6681c1b -
Trigger Event:
push
-
Statement type: