mirror of
https://github.com/FuzzingLabs/fuzzforge_ai.git
synced 2026-02-12 22:32:45 +00:00
* feat: Complete migration from Prefect to Temporal BREAKING CHANGE: Replaces Prefect workflow orchestration with Temporal ## Major Changes - Replace Prefect with Temporal for workflow orchestration - Implement vertical worker architecture (rust, android) - Replace Docker registry with MinIO for unified storage - Refactor activities to be co-located with workflows - Update all API endpoints for Temporal compatibility ## Infrastructure - New: docker-compose.temporal.yaml (Temporal + MinIO + workers) - New: workers/ directory with rust and android vertical workers - New: backend/src/temporal/ (manager, discovery) - New: backend/src/storage/ (S3-cached storage with MinIO) - New: backend/toolbox/common/ (shared storage activities) - Deleted: docker-compose.yaml (old Prefect setup) - Deleted: backend/src/core/prefect_manager.py - Deleted: backend/src/services/prefect_stats_monitor.py - Deleted: Docker registry and insecure-registries requirement ## Workflows - Migrated: security_assessment workflow to Temporal - New: rust_test workflow (example/test workflow) - Deleted: secret_detection_scan (Prefect-based, to be reimplemented) - Activities now co-located with workflows for independent testing ## API Changes - Updated: backend/src/api/workflows.py (Temporal submission) - Updated: backend/src/api/runs.py (Temporal status/results) - Updated: backend/src/main.py (727 lines, TemporalManager integration) - Updated: All 16 MCP tools to use TemporalManager ## Testing - ✅ All services healthy (Temporal, PostgreSQL, MinIO, workers, backend) - ✅ All API endpoints functional - ✅ End-to-end workflow test passed (72 findings from vulnerable_app) - ✅ MinIO storage integration working (target upload/download, results) - ✅ Worker activity discovery working (6 activities registered) - ✅ Tarball extraction working - ✅ SARIF report generation working ## Documentation - ARCHITECTURE.md: Complete Temporal architecture documentation - QUICKSTART_TEMPORAL.md: Getting started guide - MIGRATION_DECISION.md: Why we chose Temporal over Prefect - IMPLEMENTATION_STATUS.md: Migration progress tracking - workers/README.md: Worker development guide ## Dependencies - Added: temporalio>=1.6.0 - Added: boto3>=1.34.0 (MinIO S3 client) - Removed: prefect>=3.4.18 * feat: Add Python fuzzing vertical with Atheris integration This commit implements a complete Python fuzzing workflow using Atheris: ## Python Worker (workers/python/) - Dockerfile with Python 3.11, Atheris, and build tools - Generic worker.py for dynamic workflow discovery - requirements.txt with temporalio, boto3, atheris dependencies - Added to docker-compose.temporal.yaml with dedicated cache volume ## AtherisFuzzer Module (backend/toolbox/modules/fuzzer/) - Reusable module extending BaseModule - Auto-discovers fuzz targets (fuzz_*.py, *_fuzz.py, fuzz_target.py) - Recursive search to find targets in nested directories - Dynamically loads TestOneInput() function - Configurable max_iterations and timeout - Real-time stats callback support for live monitoring - Returns findings as ModuleFinding objects ## Atheris Fuzzing Workflow (backend/toolbox/workflows/atheris_fuzzing/) - Temporal workflow for orchestrating fuzzing - Downloads user code from MinIO - Executes AtherisFuzzer module - Uploads results to MinIO - Cleans up cache after execution - metadata.yaml with vertical: python for routing ## Test Project (test_projects/python_fuzz_waterfall/) - Demonstrates stateful waterfall vulnerability - main.py with check_secret() that leaks progress - fuzz_target.py with Atheris TestOneInput() harness - Complete README with usage instructions ## Backend Fixes - Fixed parameter merging in REST API endpoints (workflows.py) - Changed workflow parameter passing from positional args to kwargs (manager.py) - Default parameters now properly merged with user parameters ## Testing ✅ Worker discovered AtherisFuzzingWorkflow ✅ Workflow executed end-to-end successfully ✅ Fuzz target auto-discovered in nested directories ✅ Atheris ran 100,000 iterations ✅ Results uploaded and cache cleaned * chore: Complete Temporal migration with updated CLI/SDK/docs This commit includes all remaining Temporal migration changes: ## CLI Updates (cli/) - Updated workflow execution commands for Temporal - Enhanced error handling and exceptions - Updated dependencies in uv.lock ## SDK Updates (sdk/) - Client methods updated for Temporal workflows - Updated models for new workflow execution - Updated dependencies in uv.lock ## Documentation Updates (docs/) - Architecture documentation for Temporal - Workflow concept documentation - Resource management documentation (new) - Debugging guide (new) - Updated tutorials and how-to guides - Troubleshooting updates ## README Updates - Main README with Temporal instructions - Backend README - CLI README - SDK README ## Other - Updated IMPLEMENTATION_STATUS.md - Removed old vulnerable_app.tar.gz These changes complete the Temporal migration and ensure the CLI/SDK work correctly with the new backend. * fix: Use positional args instead of kwargs for Temporal workflows The Temporal Python SDK's start_workflow() method doesn't accept a 'kwargs' parameter. Workflows must receive parameters as positional arguments via the 'args' parameter. Changed from: args=workflow_args # Positional arguments This fixes the error: TypeError: Client.start_workflow() got an unexpected keyword argument 'kwargs' Workflows now correctly receive parameters in order: - security_assessment: [target_id, scanner_config, analyzer_config, reporter_config] - atheris_fuzzing: [target_id, target_file, max_iterations, timeout_seconds] - rust_test: [target_id, test_message] * fix: Filter metadata-only parameters from workflow arguments SecurityAssessmentWorkflow was receiving 7 arguments instead of 2-5. The issue was that target_path and volume_mode from default_parameters were being passed to the workflow, when they should only be used by the system for configuration. Now filters out metadata-only parameters (target_path, volume_mode) before passing arguments to workflow execution. * refactor: Remove Prefect leftovers and volume mounting legacy Complete cleanup of Prefect migration artifacts: Backend: - Delete registry.py and workflow_discovery.py (Prefect-specific files) - Remove Docker validation from setup.py (no longer needed) - Remove ResourceLimits and VolumeMount models - Remove target_path and volume_mode from WorkflowSubmission - Remove supported_volume_modes from API and discovery - Clean up metadata.yaml files (remove volume/path fields) - Simplify parameter filtering in manager.py SDK: - Remove volume_mode parameter from client methods - Remove ResourceLimits and VolumeMount models - Remove Prefect error patterns from docker_logs.py - Clean up WorkflowSubmission and WorkflowMetadata models CLI: - Remove Volume Modes display from workflow info All removed features are Prefect-specific or Docker volume mounting artifacts. Temporal workflows use MinIO storage exclusively. * feat: Add comprehensive test suite and benchmark infrastructure - Add 68 unit tests for fuzzer, scanner, and analyzer modules - Implement pytest-based test infrastructure with fixtures - Add 6 performance benchmarks with category-specific thresholds - Configure GitHub Actions for automated testing and benchmarking - Add test and benchmark documentation Test coverage: - AtherisFuzzer: 8 tests - CargoFuzzer: 14 tests - FileScanner: 22 tests - SecurityAnalyzer: 24 tests All tests passing (68/68) All benchmarks passing (6/6) * fix: Resolve all ruff linting violations across codebase Fixed 27 ruff violations in 12 files: - Removed unused imports (Depends, Dict, Any, Optional, etc.) - Fixed undefined workflow_info variable in workflows.py - Removed dead code with undefined variables in atheris_fuzzer.py - Changed f-string to regular string where no placeholders used All files now pass ruff checks for CI/CD compliance. * fix: Configure CI for unit tests only - Renamed docker-compose.temporal.yaml → docker-compose.yml for CI compatibility - Commented out integration-tests job (no integration tests yet) - Updated test-summary to only depend on lint and unit-tests CI will now run successfully with 68 unit tests. Integration tests can be added later. * feat: Add CI/CD integration with ephemeral deployment model Implements comprehensive CI/CD support for FuzzForge with on-demand worker management: **Worker Management (v0.7.0)** - Add WorkerManager for automatic worker lifecycle control - Auto-start workers from stopped state when workflows execute - Auto-stop workers after workflow completion - Health checks and startup timeout handling (90s default) **CI/CD Features** - `--fail-on` flag: Fail builds based on SARIF severity levels (error/warning/note/info) - `--export-sarif` flag: Export findings in SARIF 2.1.0 format - `--auto-start`/`--auto-stop` flags: Control worker lifecycle - Exit code propagation: Returns 1 on blocking findings, 0 on success **Exit Code Fix** - Add `except typer.Exit: raise` handlers at 3 critical locations - Move worker cleanup to finally block for guaranteed execution - Exit codes now propagate correctly even when build fails **CI Scripts & Examples** - ci-start.sh: Start FuzzForge services with health checks - ci-stop.sh: Clean shutdown with volume preservation option - GitHub Actions workflow example (security-scan.yml) - GitLab CI pipeline example (.gitlab-ci.example.yml) - docker-compose.ci.yml: CI-optimized compose file with profiles **OSS-Fuzz Integration** - New ossfuzz_campaign workflow for running OSS-Fuzz projects - OSS-Fuzz worker with Docker-in-Docker support - Configurable campaign duration and project selection **Documentation** - Comprehensive CI/CD integration guide (docs/how-to/cicd-integration.md) - Updated architecture docs with worker lifecycle details - Updated workspace isolation documentation - CLI README with worker management examples **SDK Enhancements** - Add get_workflow_worker_info() endpoint - Worker vertical metadata in workflow responses **Testing** - All workflows tested: security_assessment, atheris_fuzzing, secret_detection, cargo_fuzzing - All monitoring commands tested: stats, crashes, status, finding - Full CI pipeline simulation verified - Exit codes verified for success/failure scenarios Ephemeral CI/CD model: ~3-4GB RAM, ~60-90s startup, runs entirely in CI containers. * fix: Resolve ruff linting violations in CI/CD code - Remove unused variables (run_id, defaults, result) - Remove unused imports - Fix f-string without placeholders All CI/CD integration files now pass ruff checks.
2548 lines
78 KiB
JSON
2548 lines
78 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
|
|
"runs": [
|
|
{
|
|
"invocations": [
|
|
{
|
|
"endTimeUtc": "2025-10-13T14:22:02.992436Z",
|
|
"executionSuccessful": true
|
|
}
|
|
],
|
|
"originalUriBaseIds": {
|
|
"WORKSPACE": {
|
|
"description": "The workspace root directory",
|
|
"uri": "file:///cache/674c3f20-2145-44d7-9c0a-42ec5e6c1bbe/workspace/"
|
|
}
|
|
},
|
|
"results": [
|
|
{
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": ".env",
|
|
"uriBaseId": "WORKSPACE"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potentially sensitive file at .env"
|
|
},
|
|
"properties": {
|
|
"findingId": "789a1789-52ff-45cb-a660-1e9a0f4ecb53",
|
|
"metadata": {
|
|
"file_size": 1546,
|
|
"file_type": "application/octet-stream"
|
|
},
|
|
"title": "Potentially sensitive file: .env"
|
|
},
|
|
"ruleId": "sensitive_file_medium"
|
|
},
|
|
{
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": ".git-credentials",
|
|
"uriBaseId": "WORKSPACE"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potentially sensitive file at .git-credentials"
|
|
},
|
|
"properties": {
|
|
"findingId": "d9c3a279-d206-4554-8fa6-c9554e094b8a",
|
|
"metadata": {
|
|
"file_size": 168,
|
|
"file_type": "application/octet-stream"
|
|
},
|
|
"title": "Potentially sensitive file: .git-credentials"
|
|
},
|
|
"ruleId": "sensitive_file_medium"
|
|
},
|
|
{
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "private_key.pem",
|
|
"uriBaseId": "WORKSPACE"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potentially sensitive file at private_key.pem"
|
|
},
|
|
"properties": {
|
|
"findingId": "aa0ed63c-e8fb-4a53-a163-43c6691484ca",
|
|
"metadata": {
|
|
"file_size": 381,
|
|
"file_type": "application/pem-certificate-chain"
|
|
},
|
|
"title": "Potentially sensitive file: private_key.pem"
|
|
},
|
|
"ruleId": "sensitive_file_medium"
|
|
},
|
|
{
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "wallet.json",
|
|
"uriBaseId": "WORKSPACE"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potentially sensitive file at wallet.json"
|
|
},
|
|
"properties": {
|
|
"findingId": "9cfc6fcb-362c-4b03-acd7-401c4063d6ca",
|
|
"metadata": {
|
|
"file_size": 1206,
|
|
"file_type": "application/json"
|
|
},
|
|
"title": "Potentially sensitive file: wallet.json"
|
|
},
|
|
"ruleId": "sensitive_file_medium"
|
|
},
|
|
{
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": ".npmrc",
|
|
"uriBaseId": "WORKSPACE"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potentially sensitive file at .npmrc"
|
|
},
|
|
"properties": {
|
|
"findingId": "50927a5c-5e1b-4ab1-a244-6909c1e46ae7",
|
|
"metadata": {
|
|
"file_size": 238,
|
|
"file_type": "application/octet-stream"
|
|
},
|
|
"title": "Potentially sensitive file: .npmrc"
|
|
},
|
|
"ruleId": "sensitive_file_medium"
|
|
},
|
|
{
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": ".fuzzforge/.env",
|
|
"uriBaseId": "WORKSPACE"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potentially sensitive file at .fuzzforge/.env"
|
|
},
|
|
"properties": {
|
|
"findingId": "a6acdf42-1d34-44b4-9660-ef9808fbb1df",
|
|
"metadata": {
|
|
"file_size": 897,
|
|
"file_type": "application/octet-stream"
|
|
},
|
|
"title": "Potentially sensitive file: .env"
|
|
},
|
|
"ruleId": "sensitive_file_medium"
|
|
},
|
|
{
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": ".fuzzforge/.env.template",
|
|
"uriBaseId": "WORKSPACE"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potentially sensitive file at .fuzzforge/.env.template"
|
|
},
|
|
"properties": {
|
|
"findingId": "4fe420a1-4bbc-4dca-ad45-48f120dcc6bd",
|
|
"metadata": {
|
|
"file_size": 569,
|
|
"file_type": "application/octet-stream"
|
|
},
|
|
"title": "Potentially sensitive file: .env.template"
|
|
},
|
|
"ruleId": "sensitive_file_medium"
|
|
},
|
|
{
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "data/credentials.json",
|
|
"uriBaseId": "WORKSPACE"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potentially sensitive file at data/credentials.json"
|
|
},
|
|
"properties": {
|
|
"findingId": "11cf821c-4a88-449d-bc60-2073f588f058",
|
|
"metadata": {
|
|
"file_size": 1057,
|
|
"file_type": "application/json"
|
|
},
|
|
"title": "Potentially sensitive file: credentials.json"
|
|
},
|
|
"ruleId": "sensitive_file_medium"
|
|
},
|
|
{
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "data/api_keys.txt",
|
|
"uriBaseId": "WORKSPACE"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potentially sensitive file at data/api_keys.txt"
|
|
},
|
|
"properties": {
|
|
"findingId": "5f5b0c4b-7780-43dc-986c-0798d5cadcf1",
|
|
"metadata": {
|
|
"file_size": 1138,
|
|
"file_type": "text/plain"
|
|
},
|
|
"title": "Potentially sensitive file: api_keys.txt"
|
|
},
|
|
"ruleId": "sensitive_file_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Use parameterized queries or prepared statements instead"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "app.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "query = f\"SELECT * FROM users WHERE id = {user_id}\""
|
|
},
|
|
"startLine": 32
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Detected potential SQL injection vulnerability via F-string in SQL query"
|
|
},
|
|
"properties": {
|
|
"findingId": "5a3a4b61-aac8-4dc8-8690-dbd7c4b7cd00",
|
|
"metadata": {
|
|
"vulnerability_type": "F-string in SQL query"
|
|
},
|
|
"title": "Potential SQL Injection: F-string in SQL query"
|
|
},
|
|
"ruleId": "sql_injection_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Remove hardcoded API Key and use environment variables or secure vault"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/api_handler.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "STRIPE_API_KEY = \"sk_live_4eC39HqLyjWDarjtT1zdp7dc\""
|
|
},
|
|
"startLine": 25
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potential hardcoded API Key in src/api_handler.py"
|
|
},
|
|
"properties": {
|
|
"findingId": "6f76b93a-9ef7-4e60-b28c-99d407def69d",
|
|
"metadata": {
|
|
"secret_type": "API Key"
|
|
},
|
|
"title": "Hardcoded API Key detected"
|
|
},
|
|
"ruleId": "hardcoded_secret_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Remove hardcoded Authentication Token and use environment variables or secure vault"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/api_handler.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "SECRET_TOKEN = \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9"
|
|
},
|
|
"startLine": 21
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potential hardcoded Authentication Token in src/api_handler.py"
|
|
},
|
|
"properties": {
|
|
"findingId": "8f8ca33a-beef-4993-95d1-ac619c1131b4",
|
|
"metadata": {
|
|
"secret_type": "Authentication Token"
|
|
},
|
|
"title": "Hardcoded Authentication Token detected"
|
|
},
|
|
"ruleId": "hardcoded_secret_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to eval()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/api_handler.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "result = eval(user_data) # Code injection vulnerability"
|
|
},
|
|
"startLine": 34
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function eval(): Arbitrary code execution"
|
|
},
|
|
"properties": {
|
|
"findingId": "d26f7d9f-3ccb-41d3-bb89-e07872e3011c",
|
|
"metadata": {
|
|
"function": "eval()",
|
|
"risk": "Arbitrary code execution"
|
|
},
|
|
"title": "Dangerous function: eval()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to eval()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/api_handler.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "func = eval(f\"lambda x: {code}\") # Dangerous eval"
|
|
},
|
|
"startLine": 54
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function eval(): Arbitrary code execution"
|
|
},
|
|
"properties": {
|
|
"findingId": "85a7bb47-6d99-4c62-aa4a-07ac52788f1d",
|
|
"metadata": {
|
|
"function": "eval()",
|
|
"risk": "Arbitrary code execution"
|
|
},
|
|
"title": "Dangerous function: eval()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to exec()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/api_handler.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "exec(compiled, data) # Code execution vulnerability"
|
|
},
|
|
"startLine": 49
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function exec(): Arbitrary code execution"
|
|
},
|
|
"properties": {
|
|
"findingId": "3677163c-22dd-4aa0-ba64-bb39e295353e",
|
|
"metadata": {
|
|
"function": "exec()",
|
|
"risk": "Arbitrary code execution"
|
|
},
|
|
"title": "Dangerous function: exec()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to os.system()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/api_handler.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "os.system(\"cat \" + filename) # Command injection"
|
|
},
|
|
"startLine": 44
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function os.system(): Command injection risk"
|
|
},
|
|
"properties": {
|
|
"findingId": "f51474d4-b336-49aa-a49e-e1d2ee4022b4",
|
|
"metadata": {
|
|
"function": "os.system()",
|
|
"risk": "Command injection risk"
|
|
},
|
|
"title": "Dangerous function: os.system()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to os.system()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/api_handler.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "os.system(f\"echo '{log_message}' >> /var/log/app.log\") # Command injection via logs"
|
|
},
|
|
"startLine": 71
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function os.system(): Command injection risk"
|
|
},
|
|
"properties": {
|
|
"findingId": "1548153c-66f7-4590-aa91-2e6fd4fcc0a6",
|
|
"metadata": {
|
|
"function": "os.system()",
|
|
"risk": "Command injection risk"
|
|
},
|
|
"title": "Dangerous function: os.system()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to subprocess with shell=True"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/api_handler.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "result = subprocess.call(command, shell=True) # Command injection risk"
|
|
},
|
|
"startLine": 39
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function subprocess with shell=True: Command injection risk"
|
|
},
|
|
"properties": {
|
|
"findingId": "58c3a149-f23b-40c8-94d4-4e6056e156c6",
|
|
"metadata": {
|
|
"function": "subprocess with shell=True",
|
|
"risk": "Command injection risk"
|
|
},
|
|
"title": "Dangerous function: subprocess with shell=True"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Use parameterized queries or prepared statements instead"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/database.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "query = \"SELECT * FROM users WHERE username = '\" + user_input + \"'\""
|
|
},
|
|
"startLine": 43
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Detected potential SQL injection vulnerability via String concatenation in SQL"
|
|
},
|
|
"properties": {
|
|
"findingId": "06de8ae9-49dc-4914-ac00-5f647ed44e66",
|
|
"metadata": {
|
|
"vulnerability_type": "String concatenation in SQL"
|
|
},
|
|
"title": "Potential SQL Injection: String concatenation in SQL"
|
|
},
|
|
"ruleId": "sql_injection_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Use parameterized queries or prepared statements instead"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/database.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "query = f\"SELECT * FROM products WHERE name LIKE '%{search_term}%' AND category = '{category}'\""
|
|
},
|
|
"startLine": 50
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Detected potential SQL injection vulnerability via String formatting in SQL"
|
|
},
|
|
"properties": {
|
|
"findingId": "c67f3ba5-f076-4b40-94f0-d4509e9a1a0e",
|
|
"metadata": {
|
|
"vulnerability_type": "String formatting in SQL"
|
|
},
|
|
"title": "Potential SQL Injection: String formatting in SQL"
|
|
},
|
|
"ruleId": "sql_injection_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Use parameterized queries or prepared statements instead"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/database.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "query = \"UPDATE users SET profile = '%s' WHERE id = %s\" % (data, user_id)"
|
|
},
|
|
"startLine": 57
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Detected potential SQL injection vulnerability via String formatting in SQL"
|
|
},
|
|
"properties": {
|
|
"findingId": "0ad7f210-7001-4cd0-a770-b242e1c99c08",
|
|
"metadata": {
|
|
"vulnerability_type": "String formatting in SQL"
|
|
},
|
|
"title": "Potential SQL Injection: String formatting in SQL"
|
|
},
|
|
"ruleId": "sql_injection_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Use parameterized queries or prepared statements instead"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/database.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "query = f\"SELECT * FROM products WHERE name LIKE '%{search_term}%' AND category = '{category}'\""
|
|
},
|
|
"startLine": 50
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Detected potential SQL injection vulnerability via F-string in SQL query"
|
|
},
|
|
"properties": {
|
|
"findingId": "5981bea3-c5eb-4526-925e-5632f389ca0f",
|
|
"metadata": {
|
|
"vulnerability_type": "F-string in SQL query"
|
|
},
|
|
"title": "Potential SQL Injection: F-string in SQL query"
|
|
},
|
|
"ruleId": "sql_injection_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Use parameterized queries or prepared statements instead"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/database.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "query = \"SELECT * FROM users WHERE username = '\" + user_input + \"'\""
|
|
},
|
|
"startLine": 43
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Detected potential SQL injection vulnerability via Dynamic query building"
|
|
},
|
|
"properties": {
|
|
"findingId": "aa77e153-0ebd-4769-80d6-717c15eb8735",
|
|
"metadata": {
|
|
"vulnerability_type": "Dynamic query building"
|
|
},
|
|
"title": "Potential SQL Injection: Dynamic query building"
|
|
},
|
|
"ruleId": "sql_injection_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Use parameterized queries or prepared statements instead"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/database.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "final_query = base_query + where_clause"
|
|
},
|
|
"startLine": 75
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Detected potential SQL injection vulnerability via Dynamic query building"
|
|
},
|
|
"properties": {
|
|
"findingId": "5188d0ff-83ac-4003-af1c-cf892825916e",
|
|
"metadata": {
|
|
"vulnerability_type": "Dynamic query building"
|
|
},
|
|
"title": "Potential SQL Injection: Dynamic query building"
|
|
},
|
|
"ruleId": "sql_injection_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to os.system()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/database.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "os.system(f\"mysqldump -u {DB_USER} -p{DB_PASSWORD} production > {backup_name}\")"
|
|
},
|
|
"startLine": 69
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function os.system(): Command injection risk"
|
|
},
|
|
"properties": {
|
|
"findingId": "fd1cc762-9f1b-47f7-a325-76efec666309",
|
|
"metadata": {
|
|
"function": "os.system()",
|
|
"risk": "Command injection risk"
|
|
},
|
|
"title": "Dangerous function: os.system()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to pickle.load()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/database.py",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "user_prefs = pickle.loads(data) # Dangerous pickle deserialization"
|
|
},
|
|
"startLine": 64
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function pickle.load(): Deserialization vulnerability"
|
|
},
|
|
"properties": {
|
|
"findingId": "4399c5ae-9989-4789-8502-715df31ee6d4",
|
|
"metadata": {
|
|
"function": "pickle.load()",
|
|
"risk": "Deserialization vulnerability"
|
|
},
|
|
"title": "Dangerous function: pickle.load()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Remove hardcoded Private Key and use environment variables or secure vault"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/backup.js",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "const BITCOIN_PRIVATE_KEY = \"5KJvsngHeMpm884wtkJNzQGaCErckhHJBGFsvd3VyK5qMZXj3hS\";"
|
|
},
|
|
"startLine": 81
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potential hardcoded Private Key in scripts/backup.js"
|
|
},
|
|
"properties": {
|
|
"findingId": "ce0c3572-b193-4005-81e8-931c54d306be",
|
|
"metadata": {
|
|
"secret_type": "Private Key"
|
|
},
|
|
"title": "Hardcoded Private Key detected"
|
|
},
|
|
"ruleId": "hardcoded_secret_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Remove hardcoded Potential Secret Hash and use environment variables or secure vault"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/backup.js",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "const BITCOIN_PRIVATE_KEY = \"5KJvsngHeMpm884wtkJNzQGaCErckhHJBGFsvd3VyK5qMZXj3hS\";"
|
|
},
|
|
"startLine": 81
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potential hardcoded Potential Secret Hash in scripts/backup.js"
|
|
},
|
|
"properties": {
|
|
"findingId": "0eaefd35-ce0e-49ca-868f-5fcc2371b232",
|
|
"metadata": {
|
|
"secret_type": "Potential Secret Hash"
|
|
},
|
|
"title": "Hardcoded Potential Secret Hash detected"
|
|
},
|
|
"ruleId": "hardcoded_secret_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to eval()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/backup.js",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "eval(userInput); // Code injection vulnerability"
|
|
},
|
|
"startLine": 23
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function eval(): Arbitrary code execution"
|
|
},
|
|
"properties": {
|
|
"findingId": "86a8716d-a8a7-4a1e-8f22-d63158eea7d7",
|
|
"metadata": {
|
|
"function": "eval()",
|
|
"risk": "Arbitrary code execution"
|
|
},
|
|
"title": "Dangerous function: eval()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to new Function()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/backup.js",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "return new Function(code); // Code injection vulnerability"
|
|
},
|
|
"startLine": 28
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function new Function(): Arbitrary code execution"
|
|
},
|
|
"properties": {
|
|
"findingId": "650a6683-abda-4b07-8cf8-c74a16bcc3b9",
|
|
"metadata": {
|
|
"function": "new Function()",
|
|
"risk": "Arbitrary code execution"
|
|
},
|
|
"title": "Dangerous function: new Function()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to innerHTML"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/backup.js",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "document.body.innerHTML = message; // XSS vulnerability"
|
|
},
|
|
"startLine": 33
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function innerHTML: XSS vulnerability"
|
|
},
|
|
"properties": {
|
|
"findingId": "6af80143-27c7-47ca-865d-b31386ac4b82",
|
|
"metadata": {
|
|
"function": "innerHTML",
|
|
"risk": "XSS vulnerability"
|
|
},
|
|
"title": "Dangerous function: innerHTML"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to innerHTML"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/backup.js",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "document.getElementById('content').innerHTML = html; // XSS vulnerability"
|
|
},
|
|
"startLine": 37
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function innerHTML: XSS vulnerability"
|
|
},
|
|
"properties": {
|
|
"findingId": "c5305cb6-4a77-4f60-a92a-903dd9c21a0a",
|
|
"metadata": {
|
|
"function": "innerHTML",
|
|
"risk": "XSS vulnerability"
|
|
},
|
|
"title": "Dangerous function: innerHTML"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to document.write()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/backup.js",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "document.write(data); // XSS vulnerability"
|
|
},
|
|
"startLine": 42
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function document.write(): XSS vulnerability"
|
|
},
|
|
"properties": {
|
|
"findingId": "7272dbd9-e0af-43ba-a9cc-d5222f824626",
|
|
"metadata": {
|
|
"function": "document.write()",
|
|
"risk": "XSS vulnerability"
|
|
},
|
|
"title": "Dangerous function: document.write()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Remove hardcoded Private Key and use environment variables or secure vault"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/Main.java",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "private static final String PRIVATE_KEY = \"-----BEGIN RSA PRIVATE KEY-----\\nMIIEpAIBAAKCAQ...\";"
|
|
},
|
|
"startLine": 77
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potential hardcoded Private Key in src/Main.java"
|
|
},
|
|
"properties": {
|
|
"findingId": "8584c0ef-39b4-4d48-baa3-417467389a78",
|
|
"metadata": {
|
|
"secret_type": "Private Key"
|
|
},
|
|
"title": "Hardcoded Private Key detected"
|
|
},
|
|
"ruleId": "hardcoded_secret_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Use parameterized queries or prepared statements instead"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/Main.java",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "String query = \"SELECT * FROM users WHERE id = \" + userId; // SQL injection"
|
|
},
|
|
"startLine": 23
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Detected potential SQL injection vulnerability via String concatenation in SQL"
|
|
},
|
|
"properties": {
|
|
"findingId": "4ac695f7-5883-4fb1-b4b9-b16b481eea7a",
|
|
"metadata": {
|
|
"vulnerability_type": "String concatenation in SQL"
|
|
},
|
|
"title": "Potential SQL Injection: String concatenation in SQL"
|
|
},
|
|
"ruleId": "sql_injection_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Use parameterized queries or prepared statements instead"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/Main.java",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "String query = \"SELECT * FROM products WHERE name LIKE '%\" + searchTerm + \"%'\";"
|
|
},
|
|
"startLine": 29
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Detected potential SQL injection vulnerability via String concatenation in SQL"
|
|
},
|
|
"properties": {
|
|
"findingId": "eed6f3e9-bcf9-4f17-aeab-353ece10d026",
|
|
"metadata": {
|
|
"vulnerability_type": "String concatenation in SQL"
|
|
},
|
|
"title": "Potential SQL Injection: String concatenation in SQL"
|
|
},
|
|
"ruleId": "sql_injection_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Use parameterized queries or prepared statements instead"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/Main.java",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "String query = \"SELECT * FROM users WHERE id = \" + userId; // SQL injection"
|
|
},
|
|
"startLine": 23
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Detected potential SQL injection vulnerability via Dynamic query building"
|
|
},
|
|
"properties": {
|
|
"findingId": "e5ba6110-8336-45c3-97d0-dcb387d109d4",
|
|
"metadata": {
|
|
"vulnerability_type": "Dynamic query building"
|
|
},
|
|
"title": "Potential SQL Injection: Dynamic query building"
|
|
},
|
|
"ruleId": "sql_injection_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Use parameterized queries or prepared statements instead"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/Main.java",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "String query = \"SELECT * FROM products WHERE name LIKE '%\" + searchTerm + \"%'\";"
|
|
},
|
|
"startLine": 29
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Detected potential SQL injection vulnerability via Dynamic query building"
|
|
},
|
|
"properties": {
|
|
"findingId": "00a752d2-f838-4c76-8449-a3ecbd8abbbe",
|
|
"metadata": {
|
|
"vulnerability_type": "Dynamic query building"
|
|
},
|
|
"title": "Potential SQL Injection: Dynamic query building"
|
|
},
|
|
"ruleId": "sql_injection_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to eval()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "eval($code); // Code execution vulnerability"
|
|
},
|
|
"startLine": 28
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function eval(): Arbitrary code execution"
|
|
},
|
|
"properties": {
|
|
"findingId": "e67cbb50-6d5f-4e7f-b220-84d1eb8ffadc",
|
|
"metadata": {
|
|
"function": "eval()",
|
|
"risk": "Arbitrary code execution"
|
|
},
|
|
"title": "Dangerous function: eval()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to exec()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "exec(\"cat \" . $_POST['file']);"
|
|
},
|
|
"startLine": 22
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function exec(): Command execution"
|
|
},
|
|
"properties": {
|
|
"findingId": "742e01ca-0a37-4539-ad5f-da1ec4174fc1",
|
|
"metadata": {
|
|
"function": "exec()",
|
|
"risk": "Command execution"
|
|
},
|
|
"title": "Dangerous function: exec()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to exec()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "shell_exec(\"ping \" . $_GET['host']);"
|
|
},
|
|
"startLine": 23
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function exec(): Command execution"
|
|
},
|
|
"properties": {
|
|
"findingId": "2a7b3fcf-ac4e-4616-9064-6e48b605a10d",
|
|
"metadata": {
|
|
"function": "exec()",
|
|
"risk": "Command execution"
|
|
},
|
|
"title": "Dangerous function: exec()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to system()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "system(\"ls -la \" . $_GET['directory']);"
|
|
},
|
|
"startLine": 21
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function system(): Command execution"
|
|
},
|
|
"properties": {
|
|
"findingId": "995aa9c3-2ed2-495c-9dc8-1d91bf9cd165",
|
|
"metadata": {
|
|
"function": "system()",
|
|
"risk": "Command execution"
|
|
},
|
|
"title": "Dangerous function: system()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to shell_exec()"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "shell_exec(\"ping \" . $_GET['host']);"
|
|
},
|
|
"startLine": 23
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function shell_exec(): Command execution"
|
|
},
|
|
"properties": {
|
|
"findingId": "6ceadef6-1525-4329-ac35-0bbc2a720727",
|
|
"metadata": {
|
|
"function": "shell_exec()",
|
|
"risk": "Command execution"
|
|
},
|
|
"title": "Dangerous function: shell_exec()"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_GET usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "$user_id = $_GET['id'];"
|
|
},
|
|
"startLine": 12
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_GET usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "673d4e07-c719-4f59-a9d6-f850dade5ddb",
|
|
"metadata": {
|
|
"function": "Direct $_GET usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_GET usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_GET usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "system(\"ls -la \" . $_GET['directory']);"
|
|
},
|
|
"startLine": 21
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_GET usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "69f5aa15-f4ab-43f8-9df7-c2f5d23e94d8",
|
|
"metadata": {
|
|
"function": "Direct $_GET usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_GET usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_GET usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "shell_exec(\"ping \" . $_GET['host']);"
|
|
},
|
|
"startLine": 23
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_GET usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "a7de9c78-7eaf-4cbc-8926-7c72dac6a4fd",
|
|
"metadata": {
|
|
"function": "Direct $_GET usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_GET usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_GET usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "passthru(\"ps aux | grep \" . $_GET['process']);"
|
|
},
|
|
"startLine": 24
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_GET usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "925f5149-f183-430b-94e7-c6fd0514d4a9",
|
|
"metadata": {
|
|
"function": "Direct $_GET usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_GET usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_GET usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "include($_GET['page'] . '.php');"
|
|
},
|
|
"startLine": 31
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_GET usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "30b04545-1620-4c08-a0d4-8675b3f4b1bb",
|
|
"metadata": {
|
|
"function": "Direct $_GET usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_GET usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_GET usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "echo \"Welcome, \" . $_GET['name'];"
|
|
},
|
|
"startLine": 45
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_GET usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "d71e01a7-3ba6-4f38-a26d-e62ea7cc84d2",
|
|
"metadata": {
|
|
"function": "Direct $_GET usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_GET usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_GET usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "$_SESSION['user'] = $_GET['user'];"
|
|
},
|
|
"startLine": 50
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_GET usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "2cabaf1b-d312-4329-bb69-a2b46c8c6e23",
|
|
"metadata": {
|
|
"function": "Direct $_GET usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_GET usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_GET usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "$file = $_GET['file'];"
|
|
},
|
|
"startLine": 57
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_GET usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "92eb9cbc-3753-4ae1-8e74-92ca8a2d8107",
|
|
"metadata": {
|
|
"function": "Direct $_GET usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_GET usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_POST usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "$username = $_POST['username'];"
|
|
},
|
|
"startLine": 13
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_POST usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "7cc146ee-85c5-4ab7-9d95-59eefefbe144",
|
|
"metadata": {
|
|
"function": "Direct $_POST usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_POST usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_POST usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "exec(\"cat \" . $_POST['file']);"
|
|
},
|
|
"startLine": 22
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_POST usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "4dbb6a03-8f55-429c-8640-22803d90d04c",
|
|
"metadata": {
|
|
"function": "Direct $_POST usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_POST usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_POST usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "$code = $_POST['code'];"
|
|
},
|
|
"startLine": 27
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_POST usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "bd89e203-0ca2-41e8-9964-ba237c09e789",
|
|
"metadata": {
|
|
"function": "Direct $_POST usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_POST usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_POST usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "require_once($_POST['template']);"
|
|
},
|
|
"startLine": 32
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_POST usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "4d01eaaa-1803-40cc-8850-d87fcd531de0",
|
|
"metadata": {
|
|
"function": "Direct $_POST usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_POST usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_POST usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "$search = $_POST['search'];"
|
|
},
|
|
"startLine": 40
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_POST usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "cd361948-c762-44db-8444-f2ceafa350d3",
|
|
"metadata": {
|
|
"function": "Direct $_POST usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_POST usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_POST usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "print(\"Your search: \" . $_POST['query']);"
|
|
},
|
|
"startLine": 46
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_POST usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "c2810f7b-36d0-43da-926c-032fcede5227",
|
|
"metadata": {
|
|
"function": "Direct $_POST usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_POST usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_POST usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "$password = md5($_POST['password']); // Weak hashing"
|
|
},
|
|
"startLine": 53
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_POST usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "cf78be8f-5a81-4e9b-a9e1-b3c645d7e7ed",
|
|
"metadata": {
|
|
"function": "Direct $_POST usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_POST usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_POST usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "$encrypted = base64_encode($_POST['sensitive_data']); // Not encryption"
|
|
},
|
|
"startLine": 54
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_POST usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "0421e17a-6c38-400c-b01c-4e1dbd69ccfd",
|
|
"metadata": {
|
|
"function": "Direct $_POST usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_POST usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_POST usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "$username = $_POST['username'];"
|
|
},
|
|
"startLine": 61
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_POST usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "52682189-4109-461d-a965-cd8964e2b452",
|
|
"metadata": {
|
|
"function": "Direct $_POST usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_POST usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Consider safer alternatives to Direct $_POST usage"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "scripts/deploy.php",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "$password = $_POST['password'];"
|
|
},
|
|
"startLine": 62
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Use of potentially dangerous function Direct $_POST usage: Input validation missing"
|
|
},
|
|
"properties": {
|
|
"findingId": "b546ec2a-94ea-47f7-95b7-b6b3fd729d6a",
|
|
"metadata": {
|
|
"function": "Direct $_POST usage",
|
|
"risk": "Input validation missing"
|
|
},
|
|
"title": "Dangerous function: Direct $_POST usage"
|
|
},
|
|
"ruleId": "dangerous_function_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Remove hardcoded API Key and use environment variables or secure vault"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/utils.rb",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "ELASTICSEARCH_API_KEY = \"elastic_api_key_789xyz\""
|
|
},
|
|
"startLine": 64
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potential hardcoded API Key in src/utils.rb"
|
|
},
|
|
"properties": {
|
|
"findingId": "9a49fe87-069e-422d-ad32-5a7f7d4c265b",
|
|
"metadata": {
|
|
"secret_type": "API Key"
|
|
},
|
|
"title": "Hardcoded API Key detected"
|
|
},
|
|
"ruleId": "hardcoded_secret_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Remove hardcoded Hardcoded Password and use environment variables or secure vault"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/utils.rb",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "REDIS_PASSWORD = \"redis_cache_password_456\""
|
|
},
|
|
"startLine": 63
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potential hardcoded Hardcoded Password in src/utils.rb"
|
|
},
|
|
"properties": {
|
|
"findingId": "2bcadd40-a1c1-414c-8d74-62493f29ef2c",
|
|
"metadata": {
|
|
"secret_type": "Hardcoded Password"
|
|
},
|
|
"title": "Hardcoded Hardcoded Password detected"
|
|
},
|
|
"ruleId": "hardcoded_secret_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Remove hardcoded Private Key and use environment variables or secure vault"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/app.go",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "const BitcoinPrivateKey = \"5KJvsngHeMpm884wtkJNzQGaCErckhHJBGFsvd3VyK5qMZXj3hS\""
|
|
},
|
|
"startLine": 59
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potential hardcoded Private Key in src/app.go"
|
|
},
|
|
"properties": {
|
|
"findingId": "db2319c5-b551-4a14-bb26-a0d7ae2c5fa5",
|
|
"metadata": {
|
|
"secret_type": "Private Key"
|
|
},
|
|
"title": "Hardcoded Private Key detected"
|
|
},
|
|
"ruleId": "hardcoded_secret_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Remove hardcoded Private Key and use environment variables or secure vault"
|
|
}
|
|
}
|
|
],
|
|
"level": "error",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/app.go",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "const EthereumPrivateKey = \"0x4c0883a69102937d6231471b5dbb6204fe512961708279f3e2e1a2e4567890abc\""
|
|
},
|
|
"startLine": 62
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potential hardcoded Private Key in src/app.go"
|
|
},
|
|
"properties": {
|
|
"findingId": "2575602f-a5ff-45f3-9cb4-eb9e145f21ec",
|
|
"metadata": {
|
|
"secret_type": "Private Key"
|
|
},
|
|
"title": "Hardcoded Private Key detected"
|
|
},
|
|
"ruleId": "hardcoded_secret_high"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Remove hardcoded Potential Secret Hash and use environment variables or secure vault"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/app.go",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "const BitcoinPrivateKey = \"5KJvsngHeMpm884wtkJNzQGaCErckhHJBGFsvd3VyK5qMZXj3hS\""
|
|
},
|
|
"startLine": 59
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potential hardcoded Potential Secret Hash in src/app.go"
|
|
},
|
|
"properties": {
|
|
"findingId": "767f2d87-6a61-4d3e-bc58-5bd49caf678f",
|
|
"metadata": {
|
|
"secret_type": "Potential Secret Hash"
|
|
},
|
|
"title": "Hardcoded Potential Secret Hash detected"
|
|
},
|
|
"ruleId": "hardcoded_secret_medium"
|
|
},
|
|
{
|
|
"fixes": [
|
|
{
|
|
"description": {
|
|
"text": "Remove hardcoded Potential Secret Hash and use environment variables or secure vault"
|
|
}
|
|
}
|
|
],
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": "src/app.go",
|
|
"uriBaseId": "WORKSPACE"
|
|
},
|
|
"region": {
|
|
"snippet": {
|
|
"text": "const EthereumPrivateKey = \"0x4c0883a69102937d6231471b5dbb6204fe512961708279f3e2e1a2e4567890abc\""
|
|
},
|
|
"startLine": 62
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potential hardcoded Potential Secret Hash in src/app.go"
|
|
},
|
|
"properties": {
|
|
"findingId": "8b3c32e4-51b1-4ff6-9bb7-6ab74b3be112",
|
|
"metadata": {
|
|
"secret_type": "Potential Secret Hash"
|
|
},
|
|
"title": "Hardcoded Potential Secret Hash detected"
|
|
},
|
|
"ruleId": "hardcoded_secret_medium"
|
|
}
|
|
],
|
|
"tool": {
|
|
"driver": {
|
|
"informationUri": "https://fuzzforge.io",
|
|
"name": "FuzzForge Security Assessment",
|
|
"rules": [
|
|
{
|
|
"defaultConfiguration": {
|
|
"level": "warning"
|
|
},
|
|
"fullDescription": {
|
|
"text": "Detection rule for sensitive_file vulnerabilities with medium severity"
|
|
},
|
|
"id": "sensitive_file_medium",
|
|
"name": "Sensitive File",
|
|
"properties": {
|
|
"category": "sensitive_file",
|
|
"severity": "medium",
|
|
"tags": [
|
|
"security",
|
|
"sensitive_file",
|
|
"medium"
|
|
]
|
|
},
|
|
"shortDescription": {
|
|
"text": "sensitive_file vulnerability"
|
|
}
|
|
},
|
|
{
|
|
"defaultConfiguration": {
|
|
"level": "error"
|
|
},
|
|
"fullDescription": {
|
|
"text": "Detection rule for sql_injection vulnerabilities with high severity"
|
|
},
|
|
"id": "sql_injection_high",
|
|
"name": "Sql Injection",
|
|
"properties": {
|
|
"category": "sql_injection",
|
|
"severity": "high",
|
|
"tags": [
|
|
"security",
|
|
"sql_injection",
|
|
"high"
|
|
]
|
|
},
|
|
"shortDescription": {
|
|
"text": "sql_injection vulnerability"
|
|
}
|
|
},
|
|
{
|
|
"defaultConfiguration": {
|
|
"level": "error"
|
|
},
|
|
"fullDescription": {
|
|
"text": "Detection rule for hardcoded_secret vulnerabilities with high severity"
|
|
},
|
|
"id": "hardcoded_secret_high",
|
|
"name": "Hardcoded Secret",
|
|
"properties": {
|
|
"category": "hardcoded_secret",
|
|
"severity": "high",
|
|
"tags": [
|
|
"security",
|
|
"hardcoded_secret",
|
|
"high"
|
|
]
|
|
},
|
|
"shortDescription": {
|
|
"text": "hardcoded_secret vulnerability"
|
|
}
|
|
},
|
|
{
|
|
"defaultConfiguration": {
|
|
"level": "warning"
|
|
},
|
|
"fullDescription": {
|
|
"text": "Detection rule for hardcoded_secret vulnerabilities with medium severity"
|
|
},
|
|
"id": "hardcoded_secret_medium",
|
|
"name": "Hardcoded Secret",
|
|
"properties": {
|
|
"category": "hardcoded_secret",
|
|
"severity": "medium",
|
|
"tags": [
|
|
"security",
|
|
"hardcoded_secret",
|
|
"medium"
|
|
]
|
|
},
|
|
"shortDescription": {
|
|
"text": "hardcoded_secret vulnerability"
|
|
}
|
|
},
|
|
{
|
|
"defaultConfiguration": {
|
|
"level": "warning"
|
|
},
|
|
"fullDescription": {
|
|
"text": "Detection rule for dangerous_function vulnerabilities with medium severity"
|
|
},
|
|
"id": "dangerous_function_medium",
|
|
"name": "Dangerous Function",
|
|
"properties": {
|
|
"category": "dangerous_function",
|
|
"severity": "medium",
|
|
"tags": [
|
|
"security",
|
|
"dangerous_function",
|
|
"medium"
|
|
]
|
|
},
|
|
"shortDescription": {
|
|
"text": "dangerous_function vulnerability"
|
|
}
|
|
}
|
|
],
|
|
"version": "1.0.0"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"version": "2.1.0"
|
|
} |