mirror of
https://github.com/FuzzingLabs/fuzzforge_ai.git
synced 2026-02-12 21:12:56 +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:21:29.706528Z",
|
|
"executionSuccessful": true
|
|
}
|
|
],
|
|
"originalUriBaseIds": {
|
|
"WORKSPACE": {
|
|
"description": "The workspace root directory",
|
|
"uri": "file:///cache/a43da6fc-b20f-404e-9b02-7b240ebbecfe/workspace/"
|
|
}
|
|
},
|
|
"results": [
|
|
{
|
|
"level": "warning",
|
|
"locations": [
|
|
{
|
|
"physicalLocation": {
|
|
"artifactLocation": {
|
|
"uri": ".env",
|
|
"uriBaseId": "WORKSPACE"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"message": {
|
|
"text": "Found potentially sensitive file at .env"
|
|
},
|
|
"properties": {
|
|
"findingId": "cc515bb2-58b6-44db-b2c5-e9b60b5a3063",
|
|
"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": "fc041fdf-6d40-4d24-9fb0-c0f476ea9911",
|
|
"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": "2d54d55a-d862-4d96-9a17-77c7ec0c34e1",
|
|
"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": "6ec2f179-7379-4dfa-9355-66e4ae057244",
|
|
"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": "d94fe444-5779-489b-99ec-c2fe5d66735a",
|
|
"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": "d5218805-3b79-4c72-89cf-e3e3414ef712",
|
|
"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": "904bba63-d0c8-4ae1-a5e2-b9e682bb3796",
|
|
"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": "524c97c2-556c-4bad-9aef-af2d9ea9fdf0",
|
|
"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": "69152d16-c878-43a5-964f-cc8e874f31b3",
|
|
"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": "3db5a4fa-def2-4d81-9187-0fb46e873260",
|
|
"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": "d5811980-a082-4554-a974-97b05aef2848",
|
|
"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": "7ecf6060-7802-4bf7-86d8-89abda215ee7",
|
|
"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": "654a07d3-ec43-41ce-bd1b-5478447ae459",
|
|
"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": "6fa2c1fa-7037-4e33-a5ec-ef5b473b3298",
|
|
"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": "d6869bca-82dd-4e70-81ae-8fa1fdec1e21",
|
|
"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": "902154e2-206c-4de5-ac7c-d9a09c0a7c17",
|
|
"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": "1ec0b2c2-8cfc-4310-9dae-7984bebfaafd",
|
|
"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": "02314322-0b91-4fd8-aa18-6207534ee4fe",
|
|
"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": "a3a7ba8b-5c98-4950-b6b9-05b5641ac39a",
|
|
"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": "e522927e-32a9-4b27-8b6a-9d9f9655d5fa",
|
|
"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": "e59be6f6-b9ae-45a8-b769-f6cd02e5639a",
|
|
"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": "b1c2408a-08eb-44d8-9047-f96f1c408725",
|
|
"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": "05fce48b-a983-4325-99a6-a84ade928fed",
|
|
"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": "3a4ffe16-92f2-479e-873f-91b179b9540c",
|
|
"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": "67ceec61-d8ab-4086-95cd-b6e1fcac073d",
|
|
"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": "d15d3c30-89b6-4d1a-82ab-9fc190511f28",
|
|
"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": "2b36262d-8938-40e2-ac2e-a339f9171adb",
|
|
"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": "6affa3c2-bb9e-4b5f-b6ce-6f9850c01b14",
|
|
"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": "eff8670f-7221-48c0-909e-97f7d215c135",
|
|
"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": "dd85ef8c-c3aa-4710-a542-67e7ab3af5ae",
|
|
"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": "135f66a8-3db0-4853-8193-792ba4b59ff9",
|
|
"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": "30a32dab-2f1a-4f50-9aab-f5ccd0ae52f5",
|
|
"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": "eb007f9b-d668-4dc7-91f5-865ac1b78b93",
|
|
"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": "5535345d-83be-44fc-b896-41062e938017",
|
|
"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": "bc06de90-1243-458b-8d48-10d101f2ddab",
|
|
"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": "3eceeffb-4dee-4cb1-8324-2517f0b9b73a",
|
|
"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": "70108ee3-5765-4b87-9db5-b218d610e220",
|
|
"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": "0ab6f323-b71a-493e-8696-98c9405d97cd",
|
|
"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": "2dd3bf66-e217-4e26-878f-558780694202",
|
|
"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": "b74df19e-bec3-4441-b8ac-c99a62e006f1",
|
|
"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": "0c504d72-5906-4da9-a4d5-06eb749f562b",
|
|
"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": "e26456e1-2dc8-45b8-baec-f237c3f6b4f8",
|
|
"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": "344eb264-b3fd-4a43-9383-d86b1116d04f",
|
|
"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": "84455665-f937-4e88-99e0-c432faff53b7",
|
|
"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": "5705b4aa-a203-42c2-9dc1-d77377e8a313",
|
|
"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": "c47b8712-3f01-48cc-8e72-ecf12fd61721",
|
|
"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": "27d0dec5-b5c4-4cf9-a484-5be53c462cde",
|
|
"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": "23a6f646-7be5-4a71-b430-c91c30774f2d",
|
|
"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": "0362a853-8955-4bff-a26b-d8add0546433",
|
|
"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": "6e835930-728f-40f0-bcd6-df7227b5b8da",
|
|
"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": "6bac31df-5a5e-45b8-977b-f768bd7d539f",
|
|
"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": "0ffa4e28-4336-40d6-b8e6-cfc720f902e2",
|
|
"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": "23a0c11e-d263-413c-b33c-aad2d6a8f5a5",
|
|
"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": "be6a2715-09de-4983-bcd3-9d83a0b27451",
|
|
"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": "ec1e17e7-41ff-4754-af03-af4a05c61726",
|
|
"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": "3b8b39af-782c-4a63-9dcd-3a955cd75ce2",
|
|
"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": "7b1498fc-2ca5-46f8-b013-918df23060d6",
|
|
"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": "6beeb596-fb56-4abc-9454-cd3dbd71b5c9",
|
|
"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": "cec6391c-3ae2-47dd-9c4c-69aceecd293d",
|
|
"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": "f7081144-146c-4991-b7d0-197a5a6add82",
|
|
"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": "b5fe13cc-44f3-43a9-8451-074dbb343a09",
|
|
"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": "3a76ed37-5224-49fb-8288-a0ff72315b4c",
|
|
"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": "3f7d90bc-8f5a-4a25-924e-3f174226e499",
|
|
"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": "a17207a1-eeab-4901-9e40-a50133226dc2",
|
|
"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": "f173884c-48ac-447d-abd0-fa5c32b36ce8",
|
|
"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": "e10563d9-6604-4dd2-bb98-9869b99e6dec",
|
|
"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": "9d32784f-0ecf-468f-be79-3a72cb70a8cd",
|
|
"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"
|
|
} |