Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
contrast-route-duplicates
Advanced tools
A command-line tool for analyzing duplicate route signatures in Contrast Security applications.
A command-line tool for analyzing duplicate route signatures in Contrast Security applications. This tool helps identify repeated route signatures across your application, which can be useful for identifying potential issues caused from merging duplicate applications.
pip install contrast-route-duplicates
.env
file with your Contrast Security credentials:CONTRAST_BASE_URL=https://app.contrastsecurity.com/Contrast
CONTRAST_ORG_UUID=your-org-uuid
CONTRAST_API_KEY=your-api-key
CONTRAST_AUTH=your-auth-header
Basic usage:
contrast_route_duplicates APP_ID
With all options:
contrast_route_duplicates APP_ID \
--csv output.csv \
--batch-size 200 \
--concurrent-requests 20 \
--verbose
APP_ID
: The Contrast Security application ID to analyze (required)--csv
: Output file path for detailed CSV results--batch-size
: Number of routes to fetch per request (default: 100)--concurrent-requests
: Maximum number of concurrent API requests (default: 10)--verbose
: Enable verbose loggingThe tool provides a summary of route signature analysis including:
Example output:
Starting analysis...
Fetching routes: 100% ██████████ 1615/1615
Route Analysis Summary
┌──────────────────────────┬────────────┐
│ Total routes │ 1,615 │
│ Unique signatures │ 602 │
│ Signatures with duplics │ 316 │
│ Total duplicate routes │ 708 │
│ Duplicate percentage │ 43.8% │
└──────────────────────────┴────────────┘
Detailed results have been written to: output.csv
The CSV output includes two columns:
Signature
: The route signatureCount
: Number of occurrences of that signatureExample:
Signature,Count
org.example.Controller.index(),3
org.example.UserService.getUser(),2
Variable | Description | Example |
---|---|---|
CONTRAST_BASE_URL | Contrast Security API URL | https://app.contrastsecurity.com/Contrast |
CONTRAST_ORG_UUID | Organization UUID | 12345678-90ab-cdef-1234-567890abcdef |
CONTRAST_API_KEY | API Key | your-api-key |
CONTRAST_AUTH | Authorization header | base64-encoded-credentials |
Requirements:
MIT License
For issues, questions, or contributions, please open an issue in the GitHub repository.
FAQs
A command-line tool for analyzing duplicate route signatures in Contrast Security applications.
We found that contrast-route-duplicates demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.