A comprehensive C-based security analysis tool designed to perform automated security checks on C/C++, JavaScript/TypeScript, Python, Rust, Go, and Dart projects before release. This tool acts as a final control layer to prevent the deployment of code with known vulnerabilities, weak cryptography, or insufficient anti-reverse engineering protections.
- Multi-Language Support: Analyzes C/C++, JavaScript/TypeScript, Python, Rust, Go, and Dart projects
- Real-Time CVE API Integration: Live vulnerability data from NVD and OSV APIs
- Dependency Analysis: Scans package managers for vulnerable dependencies and CVEs
- Cryptographic Scanner: Detects weak ciphers, hardcoded secrets, and insecure random generation
- Binary Hardening: Verifies compiler flags and binary security features
- Static Analysis: Integrates with clang-tidy and cppcheck for memory safety issues
- Policy-Driven: Configurable security policies via
.security.yamlfiles - CI/CD Ready: Designed for integration into build pipelines
- Installation
- Quick Start
- Configuration
- Security Checks
- Demo Application
- API Reference
- Contributing
- License
One-line installation:
curl -fsSL https://raw.githubusercontent.com/masterfabric/masterfabric-pre-release/main/dist/macos/install.sh | bashOr download and install manually:
# Download the latest release
wget https://github.com/masterfabric/masterfabric-pre-release/releases/latest/download/masterfabric-macos-v1.0.0.tar.gz
# Extract and install
tar -xzf masterfabric-macos-v1.0.0.tar.gz
cd masterfabric-macos
./install.sh- macOS 10.15+ (Catalina or later)
- Administrator privileges (for installation to
/usr/local/bin) - Internet connection (for CVE database queries)
# Clone the repository
git clone https://github.com/masterfabric/masterfabric-pre-release.git
cd masterfabric-pre-release
# Install dependencies (macOS)
brew install curl json-c pkg-config
# Build the security checker
cd checker_tool
make
# Install system-wide (optional)
sudo make installmasterfabric-prerelease --versionTo remove MasterFabric Security Checker:
curl -fsSL https://raw.githubusercontent.com/masterfabric/masterfabric-pre-release/main/dist/macos/uninstall.sh | bashCreate a .security.yaml file in your project root:
failure_threshold: HIGH
approved_sdks:
- name: "react"
versions: ">=18.0.0"
- name: "express"
versions: ">=4.18.0"
blacklisted_versions:
- "lodash@<4.17.21"
- "node-fetch@<2.6.7"
minimum_acceptable_standards:
symmetric_encryption: "AES-256-GCM"
hashing: "SHA3-256"
hardcoded_secret_scan:
enabled: true
entropy_threshold: 4.5
memory_safety_checks: true
concurrency_checks: true# Check current directory
masterfabric-prerelease --check
# Check specific directory
masterfabric-prerelease --check /path/to/project
# Verbose output
masterfabric-prerelease --check --verbose
# Export results to HTML report
masterfabric-prerelease --check /path/to/project --html security_report.html
# Verbose output with HTML export
masterfabric-prerelease --check /path/to/project --verbose --html report.htmlThe tool will output a comprehensive security report with:
- Summary of findings by severity
- Detailed descriptions of each issue
- Specific recommendations for remediation
- Policy compliance status
- HTML Export: Professional reports with black and white design for sharing and printing
The MasterFabric Security Checker now includes real-time CVE API integration that fetches live vulnerability data from official sources:
- NVD API: National Vulnerability Database (NIST)
- OSV API: Open Source Vulnerabilities database
- Live vulnerability data from official CVE databases
- Multi-platform package analysis (Flutter, Node.js, Python, Rust, Go)
- CVSS score calculation and severity classification
- Version-specific vulnerability matching
Starting real-time CVE analysis using NVD and OSV APIs...
Checking Flutter dependencies for CVEs...
Fetching CVEs from NVD for package: http
Fetching CVEs from OSV for package: http (version: 0.12.2)
Found 3 vulnerabilities for package http
Found 2 CVE vulnerabilities in Flutter dependencies via APIThe .security.yaml file defines your security requirements. See the Security Policy Specification for complete documentation.
failure_threshold: Minimum severity to fail the buildapproved_sdks: Whitelist of allowed dependenciesblacklisted_versions: Explicitly forbidden versionsminimum_acceptable_standards: Cryptographic requirementshardcoded_secret_scan: Secret detection settingsrequired_hardening_flags: Compiler security flagsbinary_checks: Binary security feature requirements
- Scans
package.json,requirements.txt,Cargo.toml,go.mod - Checks against approved SDK whitelist
- Identifies blacklisted versions
- Detects known CVEs in dependencies
- Detects weak algorithms (DES, MD5, SHA1, RC4)
- Identifies hardcoded secrets using entropy analysis
- Checks for insecure random number generation
- Validates minimum cryptographic standards
- Verifies compiler security flags in build files
- Checks for stack protection, ASLR/PIE, and RELRO
- Validates debug symbol stripping
- Analyzes ELF binary security features
- Integrates with clang-tidy for C/C++ analysis
- Uses cppcheck for additional security checks
- Focuses on memory safety and concurrency issues
- Configurable check levels
Two vulnerable applications are included to demonstrate the tool's capabilities:
# Run the Next.js demo
cd cases/demo_vulnerable_app
npm install
npm run dev
# Test with security checker
cd ../../checker_tool
make test# Run the Flutter demo
cd cases/demo_flutter_vulnerable_app
flutter pub get
flutter run
# Test with security checker
cd ../../checker_tool
make testBoth demo applications contain intentional vulnerabilities including:
- Outdated dependencies with known CVEs
- Weak cryptographic implementations
- Hardcoded secrets and API keys
- Insecure random number generation
- SQL injection vulnerabilities
- Insecure data storage practices
masterfabric-prerelease [OPTIONS]
Options:
--check [PATH] Check directory for security issues
--html [FILE] Export results to HTML file
--verbose Enable verbose output
--help Show help message
--version Show version information0: All checks passed1: Policy violations found2: Configuration error3: Scan error
name: Security Check
on: [push, pull_request]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Security Checker
run: |
cd checker_tool
make
- name: Run Security Check
run: |
./checker_tool/bin/masterfabric-prerelease --check . --verbose.PHONY: security-check
security-check:
@echo "Running security analysis..."
@./checker_tool/bin/masterfabric-prerelease --check . --verbose
@echo "Security check completed"
build: security-check
# Your build process heremasterfabric-pre-release/
βββ checker_tool/ # C-based security checker
β βββ src/ # Source files
β βββ include/ # Header files
β βββ Makefile # Build configuration
β βββ README.md
βββ cases/ # Demo applications
β βββ demo_vulnerable_app/ # Next.js demo with vulnerabilities
β βββ demo_flutter_vulnerable_app/ # Flutter demo with vulnerabilities
βββ docs/ # Documentation
βββ README.md # This file
- CLI Framework: Argument parsing and path resolution
- YAML Parser: Custom parser for security policy files
- SDK Analyzer: Dependency vulnerability scanning
- Crypto Scanner: Cryptographic weakness detection
- Binary Parser: Binary hardening verification
- Static Analyzer: Integration with clang-tidy/cppcheck
- Report Generator: Results aggregation and formatting
We welcome contributions! Please see our Contributing Guidelines for details.
# Clone and build
git clone <repository-url>
cd masterfabric-pre-release/checker_tool
make debug
# Run tests
make test
# Check dependencies
make check-deps- Create new analyzer module in
src/ - Add header file in
include/ - Update main.c to call new analyzer
- Add configuration options to YAML parser
- Update documentation
This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
- Documentation: Security Policy Spec
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- clang-tidy and cppcheck for static analysis capabilities
- The security research community for vulnerability databases
- Contributors and users who help improve the tool