Review ID: 36abaaf2275aGenerated: 2026-03-19T01:15:50.731Z
CHANGES REQUESTED
54
Total Findings
36
Critical
17
High
36 of 108 Agents Deployed
DiamondPlatinumGoldSilverBronzeHR Roasty
Agent Tier: Gold
apolloraines/SAIQL-Engine →
main @ 959a373ee395
AIAI Threat Analysis
Loading AI analysis...
54 raw scanner findings — 36 critical · 17 high · 1 info
▶ Raw Scanner Output — 3314 pre-cleanup findings
⚠ Pre-Cleanup Report
This is the raw, unprocessed output from all scanner agents before AI analysis. Do not use this to fix issues individually. Multiple agents attack from different angles and frequently report the same underlying vulnerability, resulting in significant duplication. Architectural issues also appear as many separate line-level findings when they require a single structural fix.

Use the Copy Fix Workflow button above to get the AI-cleaned workflow — it deduplicates findings, removes false positives, and provides actionable steps. This raw output is provided for transparency and audit purposes only.
Showing top 1000 of 3314 findings (sorted by severity). Full data available via the review API.
CRITICALOracle database with default system credentials
tests/migration_matrix/run_matrix.sh:14
[AGENTS: Razor]security
The script uses Oracle with default system credentials: `system:StrongPass123`. This is an extremely dangerous practice as 'system' is a privileged account.
Suggested Fix
Create dedicated application users with minimal privileges for testing. Use strong, randomly generated passwords.
CRITICALHardcoded database passwords in Docker Compose
tests/migration_matrix/docker-compose.yml:20
[AGENTS: Lockdown, Razor]configuration, security
**Perspective 1:** The Docker Compose file contains multiple hardcoded database passwords ('source_password', 'root_password', 'StrongPass123'). These are weak passwords and are exposed in version control. **Perspective 2:** The Docker Compose file uses weak/default passwords (e.g., 'source_password', 'root_password', 'StrongPass123') for database services. These are easily guessable and should not be used even in test environments.
Suggested Fix
Use Docker secrets, environment variables, or external configuration files. Never commit passwords to version control.
CRITICALHardcoded download command exposes command injection
Copilot_Carl/carl_engine.py:155
[AGENTS: Chaos]edge_cases
The error message suggests running a wget command with hardcoded URL. If this message is ever executed (e.g., copy-pasted by user), it could be modified to inject arbitrary commands. The URL itself is also hardcoded and may change.
Suggested Fix
Remove hardcoded download command or use secure API for model downloading.
CRITICALCommand injection via environment variable LORETOKEN_GPU_MIN_SIZE
LTGPU/src/loretoken_cuda_hook.cpp:155
[AGENTS: Chaos]edge_cases
std::stoul(env_min_size) without validation. If env var contains non-numeric characters, stoul throws std::invalid_argument and crashes. Also, extremely large values could cause overflow.
Suggested Fix
Use strtoul with base 10 and error checking; clamp to reasonable range.
CRITICALOpenSearch healthcheck exposes admin password in command line
benchmarks/containers/opensearch/docker-compose.yml:28
[AGENTS: Razor, Vault]secrets, security
**Perspective 1:** The healthcheck command 'curl -sku admin:${OPENSEARCH_ADMIN_PASSWORD} https://localhost:9200 >/dev/null' exposes the password in the process command line, making it visible via 'ps' or similar tools. **Perspective 2:** The healthcheck command includes the admin password in plaintext: curl -sku admin:${OPENSEARCH_ADMIN_PASSWORD}. This can be seen via 'docker inspect' or process monitoring tools, exposing credentials.
Suggested Fix
Use a wrapper script that reads the password from a file or environment variable without exposing it in the command line.
CRITICALDocument extraction logs file contents and processing details
core/atlas/document_extraction.py:744
[AGENTS: Egress]data_exfiltration
The extract_document() and extract_document_safe() functions return ExtractionResult objects containing full extracted text content. If these results are logged, serialized, or transmitted to external systems, they could exfiltrate sensitive document contents including PII, credentials, or proprietary information.
Suggested Fix
Implement content filtering and redaction for extracted text before it leaves the system boundary. Add configurable redaction rules for sensitive patterns.
CRITICALHardcoded admin password in example
docs/Owners_Manual/04_First_Run_and_Healthchecks.md:57
[AGENTS: Vault]secrets
Example curl command shows hardcoded password 'admin_password' which could be copied into production configurations.
Suggested Fix
Use placeholder like '[YOUR_ADMIN_PASSWORD]' and emphasize generating strong password.
CRITICALHardcoded admin password in API documentation
docs/Owners_Manual/06_API_Guide.md:18
[AGENTS: Vault]secrets
API documentation example shows hardcoded password 'admin_password' which could lead to insecure deployments.
Suggested Fix
Replace with placeholder and add security note about password requirements.
CRITICALDefault MySQL credentials in ConnectionConfig
extensions/plugins/mysql_adapter.py:39
[AGENTS: Vault]secrets
The ConnectionConfig dataclass has default values for user='saiql_user' and password=''. While these are defaults, they create a security risk as users might not change them, leaving the database accessible with weak/default credentials.
Suggested Fix
Remove default credentials and require explicit configuration or environment variables.
CRITICALAuto-generated JWT secret persisted to disk
security/auth_manager.py:189
[AGENTS: Vault]secrets
When allow_secret_autogenerate is true and no JWT secret exists, the code generates one and writes it to 'jwt_secret.key'. This creates a persistent secret on disk that could be compromised.
Suggested Fix
If auto-generation is needed for development, keep the secret in memory only and warn the user. For production, require explicit configuration.
CRITICALHardcoded HANA password in documentation
tests/integration/hana_l2l3l4_harness/README.md:56
[AGENTS: Vault]secrets
The README includes a hardcoded password example 'L2L3L4Test123!' which could lead to users using weak or documented passwords in production.
Suggested Fix
Remove hardcoded password examples from documentation or use placeholder text emphasizing the need for strong, unique passwords.
CRITICALAdditional hardcoded HANA password in SQL examples
tests/integration/hana_l2l3l4_harness/README.md:112
[AGENTS: Vault]secrets
SQL grant script includes hardcoded password 'L2L3L4Test123!' which reinforces the pattern of including secrets in documentation.
Suggested Fix
Use placeholders like '<YOUR_STRONG_PASSWORD>' in documentation examples.
CRITICALWeak Oracle password
tests/migration_matrix/docker-compose.yml:53
[AGENTS: Harbor, Lockdown, Passkey, Razor]configuration, containers, credentials, security
**Perspective 1:** The Oracle container uses 'StrongPass123' as the password, which is weak and predictable. This is a critical security issue for database containers. **Perspective 2:** Oracle database uses 'StrongPass123' which is the same weak password as SQL Server, creating a pattern of insecure test credentials. **Perspective 3:** The Oracle container uses weak passwords 'StrongPass123' and 'source_password' for system and application users, which are insufficiently secure. **Perspective 4:** Oracle container uses 'ORACLE_PASSWORD=StrongPass123' which is weak and could be compromised in test environments that might be exposed.
Suggested Fix
Use strong, randomly generated passwords for all database containers. Store them in Docker secrets or environment variables.
CRITICALWeak SA password for MSSQL
tests/migration_matrix/docker-compose.yml:38
[AGENTS: Lockdown, Passkey, Razor]configuration, credentials, security
**Perspective 1:** The MSSQL container uses 'StrongPass123' as the SA password, which is weak and predictable. This is a critical security issue for database containers. **Perspective 2:** SQL Server uses 'StrongPass123' which is not actually strong and follows a predictable pattern. **Perspective 3:** MSSQL container uses 'SA_PASSWORD=StrongPass123' which is weak and predictable. SQL Server SA accounts are high-value targets.
Suggested Fix
Use strong, randomly generated passwords for all database containers. Store them in Docker secrets or environment variables.
CRITICALEmpty PostgreSQL password in configuration
config/database_config_secure.json:16
[AGENTS: Passkey, Razor, Vault, Warden]credentials, privacy, secrets, security
**Perspective 1:** The PostgreSQL configuration includes 'password': '' (empty string). This is an extremely insecure default that would allow authentication without a password if the configuration is used without modification. **Perspective 2:** The PostgreSQL configuration has an empty string as default password: 'password': '', which could lead to accidental unauthenticated access. **Perspective 3:** The 'secure' configuration file contains empty passwords for PostgreSQL and MySQL, which is contradictory to the 'secure' designation and could lead to insecure deployments. **Perspective 4:** The PostgreSQL configuration in database_config_secure.json has an empty password field, which contradicts the 'secure' naming and could lead to misconfiguration.
Suggested Fix
Remove the empty password default. Require explicit password configuration through environment variables or secure secrets manager.
CRITICALHardcoded default Db2 password in configuration class
extensions/plugins/db2_adapter.py:64
[AGENTS: Passkey, Vault, Warden]credentials, privacy, secrets
**Perspective 1:** The Db2Config dataclass initializes password with an empty string default. This can lead to accidental use of empty passwords in production if not explicitly set. **Perspective 2:** The Db2Config dataclass stores the database password as a plaintext string field. This password is passed directly to the ibm_db.connect() method and could be exposed in memory, logs, or error messages. **Perspective 3:** The Db2Config class includes a password field but does not enforce any password complexity requirements. This could lead to weak passwords being used for database connections.
Suggested Fix
Use a secure credential manager or environment variable injection at runtime. Implement proper credential handling with encryption and secure storage.
CRITICALDefault MSSQL credentials with empty password
extensions/plugins/mssql_adapter.py:24
[AGENTS: Lockdown, Passkey, Razor, Sentinel, Vault, Warden]configuration, credentials, input_validation, privacy, secrets, security
**Perspective 1:** The MSSQLAdapter __init__ method sets default credentials: user='sa', password=''. Using the 'sa' account with empty password is an extreme security risk. While these are defaults that should be overridden, they create a dangerous default configuration. **Perspective 2:** The MSSQLAdapter __init__ method accepts a config dictionary without validating the values. Host, port, user, password, database, and charset parameters could contain malicious values leading to injection or connection issues. **Perspective 3:** The MSSQLAdapter constructor uses default credentials: user='sa', password='', database='master'. These could be accidentally used in production. **Perspective 4:** The MSSQL adapter defaults to user 'sa' with empty password, which is an extremely insecure default configuration that could lead to accidental exposure in development environments. **Perspective 5:** The MSSQL adapter does not enable SSL/TLS by default in the connection parameters. This could lead to credentials and data being transmitted in plaintext. **Perspective 6:** The MSSQL adapter configuration defaults to an empty password for the 'sa' user if not provided. This is an insecure default that could lead to accidental misconfiguration.
Suggested Fix
Require explicit configuration for MSSQL credentials, with no defaults or secure defaults that won't work without configuration.
CRITICALMaster key resolution with insecure fallback to dev key file
security/secrets_manager.py:70
[AGENTS: Lockdown, Mirage, Vault]configuration, false_confidence, secrets
**Perspective 1:** The _resolve_master_key() method creates a persistent dev key file at '.dev_master_key' when SAIQL_MASTER_KEY is not set and SAIQL_ALLOW_DEV_KEY=true. This creates a persistent secret on disk that survives restarts and could be compromised. The file is created with 600 permissions but still represents an insecure fallback mechanism. **Perspective 2:** The secrets manager will use a persisted development master key from a file if no SAIQL_MASTER_KEY is set and SAIQL_ALLOW_DEV_KEY is true. This creates a predictable key location and weak key generation for development environments that could be exploited in production if misconfigured. **Perspective 3:** The _resolve_master_key() method creates a false sense of security by allowing SAIQL_ALLOW_DEV_KEY=true to generate and persist a dev key. This bypasses proper key management and creates a persistent secret file that could be compromised. The warning message suggests it's not for production, but the code still allows it.
Suggested Fix
Remove the dev key fallback entirely. Require SAIQL_MASTER_KEY to be set explicitly in production. If development mode is needed, generate a temporary in-memory key that is not persisted.
CRITICALEmpty MySQL password in configuration
config/database_config_secure.json:59
[AGENTS: Passkey, Vault]credentials, secrets
**Perspective 1:** The MySQL configuration includes 'password': '' (empty string). Similar to PostgreSQL, this creates an insecure default that could allow passwordless authentication. **Perspective 2:** The MySQL configuration in database_config_secure.json has an empty password field, which is insecure despite the 'secure' filename.
Suggested Fix
Require password configuration via environment variable with proper validation.
CRITICALHardcoded default admin password in documentation
docs/Owners_Manual/00_Quick_Start.md:62
[AGENTS: Gatekeeper, Passkey, Vault, Vector]attack_chains, auth, credentials, secrets
**Perspective 1:** Documentation shows example curl command with hardcoded password 'admin_password' which could lead to users using weak default credentials in production. **Perspective 2:** The quick start guide shows using hardcoded admin credentials (username: 'admin', password: 'admin_password') to get a token. This creates a predictable default that attackers can exploit, especially if users don't change it. **Perspective 3:** Documentation shows using 'admin_password' as the password for the admin user in curl examples. This encourages users to use weak default passwords and may lead to credential stuffing attacks if not changed. **Perspective 4:** The quick start guide hardcodes admin credentials (username: 'admin', password: 'admin_password') and instructs users to use them for initial authentication. This creates a predictable credential that attackers can use as the first step in an attack chain: 1) Discover exposed SAIQL instance → 2) Use default credentials → 3) Gain admin access → 4) Extract sensitive data or pivot to other systems. The guide also shows how to get tokens using these credentials, enabling token theft attacks.
Suggested Fix
Remove hardcoded credentials from documentation. Instead, instruct users to generate secure passwords and store them securely. Add warning about changing default credentials immediately after installation.
CRITICALHardcoded Redshift password in configuration class
extensions/plugins/redshift_adapter.py:106
[AGENTS: Passkey, Vault]credentials, secrets
**Perspective 1:** The RedshiftConfig dataclass has a default empty password field that could be set to hardcoded values in production code. The password is included in the connection parameters and URI generation methods, potentially exposing it in logs or error messages. **Perspective 2:** The RedshiftConfig dataclass includes a password field but doesn't enforce any password complexity requirements. This could lead to weak passwords being used for Redshift database connections.
Suggested Fix
Remove default password value and require explicit password setting via environment variables or secure secret manager. Add validation to ensure password is not empty in production environments.
CRITICALHardcoded JWT Secret Fallback
saiql_production_server.py:120
[AGENTS: Cipher, Gatekeeper]auth, key_management
**Perspective 1:** The server generates a temporary JWT secret using `secrets.token_hex(32)` if no secret is found in environment or config. This creates a different secret on each server restart, invalidating all existing tokens and causing authentication failures. In a production environment, this leads to service disruption. **Perspective 2:** If no secret key is found in environment or config, the system generates a temporary key using secrets.token_hex(32). This key is not persisted and will change on restart, invalidating all existing tokens.
Suggested Fix
Require a JWT secret to be explicitly configured via environment variable or configuration file. Remove the automatic fallback generation. Add validation at startup to ensure a secret is present.
CRITICALSystem-wide installation with --break-system-packages enables complete system compromise
scripts/install_system.sh:81
[AGENTS: Siege, Vector]attack_chains, dos
**Perspective 1:** The install_system.sh script uses '--break-system-packages' flag with pip3 install, which bypasses system package manager protections. This creates an attack chain: 1) Malicious PyPI packages can be installed, 2) System Python environment is polluted, 3) Package conflicts can break system tools, 4) Persistence is achieved through systemd service. Combined with root execution, this enables complete system takeover and persistence. **Perspective 2:** The script installs Python packages via pip3 without timeout or size limits. A malicious PyPI server could send infinite data or the network could hang indefinitely.
Suggested Fix
Use virtual environments, verify package signatures, use --user flag instead of system-wide installation, implement package allowlisting, and use isolated Python environments.
CRITICALHardcoded HANA password in shell script
tests/integration/phase07_hana_harness/scripts/load_hana_fixture.sh:5
[AGENTS: Passkey, Vault]credentials, secrets
**Perspective 1:** The shell script contains a hardcoded HANA password: 'HANA_PASSWORD="SaiqlTest123"'. Shell scripts with hardcoded credentials are a significant security risk as they can be easily extracted and may be executed in production-like environments. **Perspective 2:** The HANA fixture loading script contains a hardcoded password 'SaiqlTest123'. Scripts with hardcoded credentials are security risks if exposed.
Suggested Fix
Read passwords from environment variables or secure configuration stores. Never hardcode credentials in shell scripts.
CRITICALHardcoded HANA database password in shell script
tests/integration/phase07_hana_harness/scripts/setup_hana_docker.sh:6
[AGENTS: Gatekeeper, Passkey, Vault]auth, credentials, secrets
**Perspective 1:** The HANA setup script contains hardcoded password 'SaiqlTest123' which could be exposed in logs or version control. **Perspective 2:** The HANA Docker setup script contains a hardcoded password 'SaiqlTest123' for the master password. This password is exposed in the source code. **Perspective 3:** Shell script contains hardcoded HANA database password 'SaiqlTest123'. Scripts with hardcoded credentials should be avoided.
Suggested Fix
Generate random password or load from environment variable with secure default.
CRITICALHardcoded HANA admin password in shell script
tests/integration/hana_l2l3l4_harness/scripts/setup_hana_l2l3l4.sh:26
[AGENTS: Cipher, Mirage, Passkey, Razor, Vault, Vector, Warden]attack_chains, credentials, cryptography, false_confidence, privacy, secrets, security
**Perspective 1:** The setup script contains hardcoded HANA admin password 'SaiqlTest123' which is exposed in plaintext and could be logged or visible in process listings. **Perspective 2:** The setup script contains hardcoded database passwords (SaiqlTest123, L2L3L4Test123) that are passed as command-line arguments. These passwords could be exposed in process listings, shell history, or logs. The script also uses environment variables for passwords without secure defaults. **Perspective 3:** The setup shell script contains hardcoded passwords: HANA_ADMIN_PASSWORD='SaiqlTest123' and L2L3L4_PASSWORD='L2L3L4Test123'. These passwords are weak and visible in source control. **Perspective 4:** The shell script contains hardcoded HANA credentials: HANA_ADMIN_PASSWORD='SaiqlTest123', L2L3L4_PASSWORD='L2L3L4Test123'. These are weak passwords and should not be hardcoded. **Perspective 5:** The setup script contains HANA admin credentials (SYSTEM/SaiqlTest123) and test user credentials in plaintext. These credentials could be extracted from version control, logs, or process listings. Attack chain: 1) Attacker accesses script source or execution environment, 2) Harvests HANA credentials, 3) Connects to HANA database, 4) Performs data exfiltration or creates persistent backdoors. **Perspective 6:** The setup script contains HANA database credentials that could be exposed if the script is logged or stored insecurely. **Perspective 7:** The setup script contains hardcoded HANA database credentials (SYSTEM user with password 'SaiqlTest123'). While this is a setup script for test environments, it creates security bad practices.
Suggested Fix
Use a secrets manager, prompt for passwords interactively, or read from encrypted configuration files. Never hardcode passwords in scripts.
CRITICALHardcoded PostgreSQL credentials in adapter wrapper
core/database_manager.py:396
[AGENTS: Sanitizer, Vault]sanitization, secrets
**Perspective 1:** The PostgreSQLAdapterWrapper uses hardcoded default values for user ('postgres') and empty password. These defaults could be used in production if not properly overridden, leading to insecure configurations. **Perspective 2:** The BigQueryAdapterWrapper.execute_query method converts tuple params to dict but doesn't validate the SQL string. BigQuery uses named parameters but the SQL string itself could contain injection if built with string formatting.
Suggested Fix
Remove default credentials and require explicit configuration. Add validation to ensure credentials are not default values in production.
CRITICALHardcoded MySQL credentials in adapter wrapper
core/database_manager.py:445
[AGENTS: Vault]secrets
The MySQLAdapterWrapper uses hardcoded default values for user ('root') and empty password. These are common default credentials that should never be used in production environments.
Suggested Fix
Remove default credentials and require explicit configuration via environment variables or secure config files.
CRITICALQuery cache with user_id inclusion but no isolation enables cross-user data leakage
core/engine.py:320
[AGENTS: Trace, Vector, Wallet]attack_chains, denial_of_wallet, logging
**Perspective 1:** The query cache includes user_id in cache key but doesn't enforce isolation between users with same query. An attacker could predict or brute-force cache keys to access other users' query results. Chain: cache key prediction → cross-user data access → sensitive information disclosure → credential harvesting. **Perspective 2:** The execute_batch method processes a list of queries with no limit on the list size. An attacker could submit a large batch of expensive queries, consuming significant compute resources and leading to cost spikes. **Perspective 3:** The engine's execute method generates a trace_id but doesn't consistently propagate it through all components or include it in all log messages. This limits the ability to correlate logs across the system.
Suggested Fix
Ensure the trace_id is propagated to all components (lexer, parser, compiler, database manager) and included in all log messages. Add correlation ID support to the ExecutionContext class.
CRITICALDeployment script with sudo usage and directory creation enables privilege escalation chain
deployment/scripts/deploy.sh:81
[AGENTS: Vector]attack_chains
The deploy.sh script uses sudo to create directories and manage systemd services. Attackers can chain: 1) Environment variable injection (SAIQL_BACKUP_DIR), 2) PATH manipulation for sudo commands, 3) Race conditions in directory creation, 4) Systemd service file injection. The script also copies configuration files without validation, enabling configuration injection attacks.
Suggested Fix
Use dedicated deployment user with sudoers restrictions, validate all inputs and paths, use atomic operations for file copying, implement deployment signatures, and add audit logging.
CRITICALHardcoded default PostgreSQL password in ConnectionConfig
extensions/plugins/postgresql_adapter.py:39
[AGENTS: Vault]secrets
The ConnectionConfig dataclass defines a default empty password for PostgreSQL connections. While empty, this establishes a pattern of hardcoded credentials in configuration classes that could be exploited if developers fill in real passwords.
Suggested Fix
Remove default password value and require explicit configuration. Add validation to ensure password is not empty in production environments.
CRITICALHardcoded Snowflake password in configuration class
extensions/plugins/snowflake_adapter.py:82
[AGENTS: Passkey, Vault, Warden]credentials, privacy, secrets
**Perspective 1:** The SnowflakeConfig dataclass has a default password field that can be set to hardcoded values. While the example shows empty string, this pattern allows developers to hardcode passwords directly in code. **Perspective 2:** The SnowflakeConfig dataclass stores the password field as plaintext string. This password is used for authentication and could be exposed in memory dumps, logs, or configuration files. The password is also included in the to_connection_params() method which passes it to the snowflake connector. **Perspective 3:** The SnowflakeConfig dataclass includes a password field but doesn't enforce any password complexity requirements. This could lead to weak passwords being used for Snowflake connections.
Suggested Fix
Use a secure secrets manager or at minimum encrypt the password in memory using a library like cryptography. Consider using environment variables with secure handling or keyring storage.
CRITICALHardcoded SQL for creating test user with password
tests/integration/hana_l2l3l4_harness/harness_config.json:60
[AGENTS: Vault]secrets
The configuration includes SQL statements with hardcoded password: 'CREATE USER SAIQL_L2L3L4_TEST PASSWORD "TestPass123" NO FORCE_FIRST_PASSWORD_CHANGE;'. This exposes a default password in configuration files that could be accidentally used in production.
Suggested Fix
Generate passwords dynamically during test setup. Never include passwords in configuration files, even for tests.
CRITICALJWT secret stored in plaintext file
security/auth_manager.py:176
[AGENTS: Sanitizer, Vault]sanitization, secrets
**Perspective 1:** The _get_secret_key() method reads JWT secret from 'jwt_secret.key' file as plaintext. If this file is compromised, an attacker can forge JWT tokens and impersonate any user. **Perspective 2:** The create_user method accepts arbitrary strings for username and email without proper validation. While some downstream systems may validate, the lack of allowlist validation at creation could allow injection of special characters that bypass other security controls.
Suggested Fix
Implement allowlist validation for usernames (e.g., alphanumeric and limited special characters) and proper email format validation using a secure library.
CRITICALHardcoded test user password in shell script
tests/integration/hana_l2l3l4_harness/scripts/setup_hana_l2l3l4.sh:29
[AGENTS: Vault, Warden]privacy, secrets
**Perspective 1:** The setup script contains hardcoded test user password 'L2L3L4Test123' which is predictable and exposed in plaintext. **Perspective 2:** The setup script creates a test user with hardcoded credentials (L2L3L4_USER, L2L3L4_PASSWORD) that are exposed in the script.
Suggested Fix
Generate random credentials or use secure credential management for test users.
CRITICALHardcoded database credentials in shell script environment variables
tests/migration_matrix/run_matrix.sh:12
[AGENTS: Passkey, Vault]credentials, secrets
**Perspective 1:** Shell script sets environment variables with hardcoded database credentials including passwords. These credentials are exposed in plaintext in the script. **Perspective 2:** The script sets database passwords in environment variables which could be exposed through process listing or shell history. Passwords like 'source_password', 'target_password', 'StrongPass123' are weak and predictable.
Suggested Fix
Source credentials from environment-specific configuration files or use Docker/Kubernetes secrets. Never hardcode credentials in scripts.
CRITICALGrafana admin password exposed in environment variable requirement
deployment/docker-compose.prod.yml:114
[AGENTS: Egress, Gatekeeper, Passkey, Razor, Vault]auth, credentials, data_exfiltration, secrets, security
**Perspective 1:** The docker-compose file requires GF_ADMIN_PASSWORD environment variable but doesn't specify secure handling. If the .env file is committed or logged, the password could be exposed. **Perspective 2:** The Grafana service uses GF_SECURITY_ADMIN_PASSWORD environment variable with a required check but no validation of password strength. The password is passed directly from environment variables. **Perspective 3:** The Grafana configuration uses 'GF_SECURITY_ADMIN_PASSWORD=${GF_ADMIN_PASSWORD:?Set GF_ADMIN_PASSWORD in .env}' which could expose the password in process listings and doesn't enforce complexity requirements. **Perspective 4:** The Grafana service configuration uses GF_SECURITY_ADMIN_PASSWORD from environment variables. If the Docker Compose file is shared or logged, this could expose the password requirement. **Perspective 5:** Grafana admin password is loaded from GF_ADMIN_PASSWORD environment variable without any validation of password strength or complexity. This could allow weak passwords to be used for the Grafana admin account.
Suggested Fix
Add password complexity validation in the entrypoint script or use a secrets manager with password policy enforcement.
CRITICALHardcoded HANA admin password
tests/integration/test_hana_l2l3l4_harness.py:73
[AGENTS: Gateway, Vault, Vector]attack_chains, edge_security, secrets
**Perspective 1:** The test script uses hardcoded admin password 'SaiqlTest123' for the HANA SYSTEM user. This is a sensitive credential that should not be hardcoded. **Perspective 2:** The test harness connects as SYSTEM user to create schemas, then uses a test user. However, if the SYSTEM credentials are exposed or compromised, attack chain: 1) Attacker captures SYSTEM credentials from test environment, 2) Connects to HANA as SYSTEM (full privileges), 3) Creates backdoor users or modifies existing users, 4) Maintains persistence even after test cleanup. The dedicated test user requirement (rule 7) is enforced but SYSTEM is still used in setup. **Perspective 3:** While the test harness enforces a dedicated test user (not SYSTEM), the configuration still has SYSTEM as a default in the get_hana_config() function. This could lead to accidental use of privileged accounts if environment variables aren't set properly.
Suggested Fix
Use dedicated setup user with only necessary privileges, not SYSTEM. Implement credential rotation and ensure test credentials are isolated from production.
CRITICALEnvironment variable resolution in configuration enables credential injection via shell
core/database_manager.py:121
[AGENTS: Razor, Vector]attack_chains, security
**Perspective 1:** The configuration system resolves environment variables with pattern `${VAR:default}`. An attacker with shell access can set environment variables to inject malicious configuration, including database credentials, connection strings, and security settings. This bypasses file-based configuration security. **Perspective 2:** The database manager passes credentials directly to adapters without encryption or secure storage, exposing them in memory.
Suggested Fix
Disable environment variable interpolation in security-sensitive configurations, validate resolved values against allowlists, and implement configuration integrity checks.
CRITICALHardcoded default Teradata password in configuration class
extensions/plugins/teradata_adapter.py:86
[AGENTS: Infiltrator, Vault]attack_surface, secrets
**Perspective 1:** The TeradataConfig dataclass initializes password with an empty string default. This can lead to accidental use of empty passwords in production if not explicitly set, and the password is included in the connection parameters dictionary. **Perspective 2:** The TeradataConfig.__post_init__ method validates connection parameters with a regex that may be too permissive. The regex '^[\w\-\.@]+$' allows various special characters that could be used in injection attacks or to bypass validation.
Suggested Fix
Remove default value for password field and require explicit password setting. Add validation to ensure password is not empty when connecting.
CRITICALMaster key stored in plaintext file without encryption
security/secrets_manager.py:121
[AGENTS: Entropy, Vault, Vector, Warden]attack_chains, privacy, randomness, secrets
**Perspective 1:** The dev master key is written to '.dev_master_key' as plaintext. If an attacker gains filesystem access, they can read this key directly and decrypt all secrets stored by the secrets manager. **Perspective 2:** When `SAIQL_ALLOW_DEV_KEY=true` is set and no master key exists, the system generates a dev key using `base64.urlsafe_b64encode(os.urandom(32)).decode()` and persists it to a file. While `os.urandom` is secure, persisting the key to disk without proper encryption and relying on file permissions (chmod 600) is insecure. The key is also reused across restarts, reducing forward secrecy. **Perspective 3:** The master key resolution logic has multiple fallback paths that can be exploited: 1) Environment variable, 2) Persisted dev key file, 3) Generate new dev key with SAIQL_ALLOW_DEV_KEY=true. An attacker can set SAIQL_ALLOW_DEV_KEY=true to force generation of a new key, then use that key to decrypt secrets. Combined with the dev key persistence, this creates a reliable attack chain to bypass proper key management. **Perspective 4:** The _resolve_master_key() method automatically generates and persists a development master key to a file when SAIQL_ALLOW_DEV_KEY=true is set. This key persists across restarts without explicit user consent and could be accidentally committed to version control.
Suggested Fix
For development, generate a temporary key in memory only and warn users to set `SAIQL_MASTER_KEY`. Do not persist dev keys to disk. If persistence is required, use a key management system or hardware security module.
CRITICALHardcoded OpenSearch admin password requirement
benchmarks/containers/opensearch/docker-compose.yml:7
[AGENTS: Cipher, Lockdown, Phantom, Razor, Vault, Vector, Warden]attack_chains, authentication, configuration, cryptography, privacy, secrets, security
**Perspective 1:** The docker-compose file requires OPENSEARCH_ADMIN_PASSWORD environment variable but exposes it in the healthcheck command line, which could leak the password in process listings. **Perspective 2:** The OpenSearch healthcheck command includes the admin password in plain text: 'curl -sku admin:${OPENSEARCH_ADMIN_PASSWORD}'. This exposes the password in process listings and container logs. Additionally, security is disabled with 'plugins.security.disabled=false' which might be intentional for testing but is insecure. **Perspective 3:** The healthcheck command exposes the admin password in plaintext: `curl -sku admin:${OPENSEARCH_ADMIN_PASSWORD}`. In container environments, healthcheck commands are often visible via container inspection tools, Docker API, or orchestration platforms. This creates an attack chain: 1) Attacker gains container introspection access (via compromised host, misconfigured Docker socket, or orchestration API), 2) Extracts healthcheck configuration revealing admin credentials, 3) Uses credentials to authenticate to OpenSearch, 4) Escalates privileges or exfiltrates data. **Perspective 4:** The OpenSearch configuration passes the admin password via environment variable OPENSEARCH_INITIAL_ADMIN_PASSWORD. While this is common practice, environment variables can be exposed in process listings and logs. The healthcheck also uses the password in a curl command which could expose it. **Perspective 5:** The OpenSearch container configuration exposes the admin password via the OPENSEARCH_INITIAL_ADMIN_PASSWORD environment variable. This could allow unauthorized access to the search cluster if the environment is compromised. **Perspective 6:** The OPENSEARCH_INITIAL_ADMIN_PASSWORD uses ${OPENSEARCH_ADMIN_PASSWORD:?Set OPENSEARCH_ADMIN_PASSWORD} which can leak the password in error messages. Additionally, the healthcheck uses curl with -sku admin:${OPENSEARCH_ADMIN_PASSWORD} which exposes credentials in the container's process list. **Perspective 7:** The OPENSEARCH_INITIAL_ADMIN_PASSWORD is set via environment variable which could be exposed in logs, process listings, or shell history. Environment variables are less secure than Docker secrets or mounted files.
Suggested Fix
Use separate healthcheck endpoint without authentication or use file-based credential storage. Consider using OpenSearch's security plugin with certificate-based authentication for health checks.
CRITICALWeak JWT secret fallback creates predictable tokens
saiql_production_server.py:115
[AGENTS: Chaos, Compliance, Lockdown, Vault, Vector]attack_chains, configuration, edge_cases, regulatory, secrets
**Perspective 1:** If no JWT secret is found in environment or config, the code generates a temporary key using `secrets.token_hex(32)`. However, this happens at runtime and may be regenerated on restart, but in containerized environments this could lead to predictable or reused secrets. An attacker could brute-force or predict JWT tokens, leading to authentication bypass and privilege escalation. **Perspective 2:** If no secret key is found in environment or config, the code generates a temporary key: 'config["security"]["secret_key"] = secrets.token_hex(32)'. This temporary key would change on restart, invalidating existing sessions and potentially causing security issues. **Perspective 3:** If no JWT secret is found in config or environment, a temporary key is generated with `secrets.token_hex(32)`. This key is not persisted, so server restarts will invalidate all existing tokens, causing authentication failures. **Perspective 4:** When no JWT secret is found in environment or config, the code generates a temporary secret using secrets.token_hex(32). This temporary secret is not persisted and will change on restart, but it's logged and could be exposed in development environments. **Perspective 5:** The _load_config method generates a temporary JWT secret using secrets.token_hex(32) if no secret is found in environment or config. While this uses a cryptographically secure generator, it creates a non-persistent secret that changes on restart, invalidating existing tokens and causing availability issues. This violates SOC 2 CC7.1 (System operations) and PCI-DSS requirement 8.2.1 (Proper management of authentication credentials).
Suggested Fix
Require JWT secret to be explicitly configured via environment variables or secure config. Remove automatic generation for production environments. Log a critical error instead of generating a temporary secret.
CRITICALBigQuery adapter with insufficient cost controls on data export operations
extensions/plugins/bigquery_adapter.py:1310
[AGENTS: Egress, Gateway, Siege, Wallet]data_exfiltration, denial_of_wallet, dos, edge_security
**Perspective 1:** The BigQuery adapter's export_data_ir() and _export_data_ir_cost_safe() methods perform queries against BigQuery which can incur significant costs. While there's a maximum_bytes_billed parameter, the default values (500MB max billed per query) are still substantial. An attacker could trigger repeated export operations to run up BigQuery costs. The adapter lacks per-user rate limiting, query complexity limits, and comprehensive budget circuit breakers. **Perspective 2:** The execute_query method allows queries without mandatory maximum_bytes_billed limit. Malicious or poorly written queries could incur excessive BigQuery costs and consume significant resources. **Perspective 3:** The BigQueryAdapter logs connection details including authentication method and project information. While it doesn't log actual credentials, it does log the authentication method and whether credentials are being used from files or environment variables. This information could help attackers understand the security posture of the system. Additionally, error messages from failed connections could leak information about network configuration. **Perspective 4:** The BigQuery adapter accepts SQL queries of arbitrary length without size validation. An attacker could send extremely large queries causing resource exhaustion.
Suggested Fix
Implement strict rate limiting per user/IP, add query complexity scoring, enforce lower default maximum_bytes_billed limits, add budget circuit breakers with daily/monthly caps, and implement comprehensive cost monitoring.
CRITICALHardcoded HANA test user password
tests/integration/test_hana_l2l3l4_harness.py:70
[AGENTS: Egress, Gatekeeper, Lockdown, Mirage, Razor, Trace, Vault, Warden]auth, configuration, data_exfiltration, false_confidence, logging, privacy, secrets, security
**Perspective 1:** The test script defines a hardcoded test user password 'L2L3L4Test123' for the HANA database. This password is predictable and could be used in other environments. **Perspective 2:** The test configuration includes hardcoded credentials for HANA database connection. These credentials could be exposed if test code is deployed or shared. **Perspective 3:** The test harness uses hardcoded HANA database credentials that are loaded from environment variables. These credentials could be exposed in test logs, error messages, or test output. **Perspective 4:** While the harness correctly uses a dedicated test user instead of SYSTEM, it doesn't explicitly document or enforce the minimal set of privileges required. The test user gets CREATE SCHEMA, CATALOG READ, and SELECT on SYS schema, which may be excessive. **Perspective 5:** The test harness uses hardcoded or environment-based HANA database credentials that could expose sensitive database access information. **Perspective 6:** The HANA test harness performs extensive database operations but doesn't log test execution details, making it difficult to audit test runs and debug failures. **Perspective 7:** The HANA test configuration uses a hardcoded password 'L2L3L4Test123' which is weak and exposed in source code. **Perspective 8:** The test harness uses hardcoded credentials for the HANA test user (SAIQL_L2L3L4_TEST with password 'L2L3L4Test123'). While this is for testing, it creates a pattern of hardcoding credentials that could be copied to production code.
Suggested Fix
Use test-specific credentials with minimal privileges and ensure they're not logged or exposed in test output.
CRITICALHardcoded MySQL credentials in documentation examples
extensions/plugins/mysql_adapter.py:1359
[AGENTS: Blacklist, Cipher, Compliance, Exploit, Gatekeeper, Lockdown, Passkey, Recon, Sentinel, Vault, Warden]auth, business_logic, configuration, credentials, cryptography, info_disclosure, input_validation, output_encoding, privacy, regulatory, secrets
**Perspective 1:** The docstring at the beginning of the file shows hardcoded credentials in usage examples: 'user='<YOUR_USER>', password='<YOUR_PASSWORD>'. While these are placeholders, they establish a pattern that could lead to real credentials being hardcoded. **Perspective 2:** The MySQL adapter configuration includes hardcoded default credentials (user: 'saiql_user', password: ''). While these are defaults, they could be used in production if not properly overridden, leading to weak authentication. **Perspective 3:** SSLMode.PREFERRED is the default, which may fall back to unencrypted connections. SSL certificate validation is disabled for REQUIRED mode (check_hostname=False, verify_mode=ssl.CERT_NONE). **Perspective 4:** The MySQL adapter's ConnectionConfig.to_connection_params() method includes the password in plaintext in the connection parameters dictionary. While this is necessary for PyMySQL connection, the password could be exposed in logs, error messages, or memory dumps if not properly handled. **Perspective 5:** The execute_query method accepts arbitrary SQL and parameters without validating that the SQL doesn't contain dangerous operations or that parameters are properly sanitized. **Perspective 6:** The execute_query method logs errors and warnings that may contain sensitive SQL query fragments or data values. No redaction is applied to error messages before logging. **Perspective 7:** The SSLMode enum includes 'PREFERRED' as default which may fall back to unencrypted connections. The configuration allows 'tlsAllowInvalidCertificates: True' which disables certificate validation, enabling MITM attacks. **Perspective 8:** The execute_query method returns detailed database error messages including SQL errors and operational errors, which could reveal database structure and implementation details. **Perspective 9:** Routine creation strips DEFINER clause but lacks documentation of security implications and compliance with least privilege (SOC 2 CC6.1). **Perspective 10:** The PreparedStatementCache has a max_size limit but no monitoring of memory usage or query complexity. An attacker could craft complex SQL statements to exhaust memory through the prepared statement cache, potentially causing denial of service. **Perspective 11:** SQL queries and error messages containing user data are logged without sanitization, potentially exposing sensitive information or allowing log injection attacks.
Suggested Fix
Implement secure password handling: use getpass for interactive input, ensure passwords are not logged, consider using environment variables or secure vaults for password storage, and add password masking in debug output.
CRITICALHardcoded HANA password in configuration validation
extensions/plugins/hana_adapter.py:104
[AGENTS: Passkey, Vault]credentials, secrets
**Perspective 1:** The HANA adapter validates that password is provided in config but stores it in plaintext in self.password. The password is never logged but remains in memory and could be exposed through debugging or memory inspection. **Perspective 2:** The HANA adapter stores the password in self.password without any encryption or secure handling. While it's not logged, it remains in memory and could be exposed through memory dumps.
Suggested Fix
Use secure credential storage with encryption at rest. Implement secure password handling with zeroization after use.
CRITICALHardcoded PostgreSQL password requirement without secure default
benchmarks/containers/postgres_pgvector/docker-compose.yml:6
[AGENTS: Egress, Passkey, Vault]credentials, data_exfiltration, secrets
**Perspective 1:** The docker-compose file requires POSTGRES_PASSWORD environment variable but does not enforce secure defaults or provide guidance on secure generation. This could lead to weak passwords being used in production. **Perspective 2:** The PostgreSQL password is passed via POSTGRES_PASSWORD environment variable without any complexity validation. The environment variable is required but there's no check for password strength, length, or complexity. **Perspective 3:** The healthcheck command uses the POSTGRES_PASSWORD environment variable directly in a shell command, which could expose the password in process listings or logs. While this is within a container, it's still a potential exfiltration vector if logs are captured or if the container's process list is accessible.
Suggested Fix
Use a separate healthcheck script that doesn't expose the password in the command line, or use PostgreSQL's pg_isready with password file authentication.
CRITICALHANA database password in configuration file
tests/integration/hana_l2l3l4_harness/harness_config.json:17
[AGENTS: Vault]secrets
The harness configuration includes 'password': '${HANA_PASSWORD}' which will be substituted from environment variables. However, the configuration file itself may be checked into version control, exposing the environment variable name and potentially default values.
Suggested Fix
Store sensitive configuration entirely outside of version control. Use a secrets manager or secure configuration service. If environment variables are used, ensure the configuration template doesn't reveal sensitive patterns.
CRITICALEnvironment variable based credential loading without validation
extensions/plugins/snowflake_adapter.py:1489
[AGENTS: Gatekeeper, Gateway, Harbor, Siege, Supply, Vault, Vector, Warden]attack_chains, auth, containers, dos, edge_security, privacy, secrets, supply_chain
**Perspective 1:** The create_adapter_from_env() function loads Snowflake credentials directly from environment variables without validation or secure fallback mechanisms. **Perspective 2:** The `create_adapter_from_env()` function loads credentials directly from environment variables without validation or sanitization. Missing or malformed credentials could lead to connection errors or credential leakage in error messages. **Perspective 3:** The export_data() method fetches all rows into memory at once with 'cursor.fetchall()' and stores them in a list. For large tables, this can exhaust memory. While there's a configurable max_rows_export limit, it's applied via SQL LIMIT but the entire result set is still loaded into memory. **Perspective 4:** _compute_data_checksum() processes entire dataset in memory, converting each row to JSON strings and concatenating them. For large exports, this can cause significant CPU and memory usage. **Perspective 5:** execute_query() has a retry loop with exponential backoff but no overall timeout. A persistent connection issue could cause the function to hang for extended periods (retry_count * retry_delay * exponential factor). **Perspective 6:** The adapter accepts hardcoded credentials in SnowflakeConfig class. When deployed in containers, credentials should come from environment variables or secrets management systems, not hardcoded in configuration objects. **Perspective 7:** The generate_proof_bundle method creates deterministic artifacts but does not verify that the build process itself is reproducible. There's no mechanism to ensure that the same source code and dependencies produce identical proof bundles across different build environments. **Perspective 8:** The create_adapter_from_env() function reads credentials directly from environment variables without any encryption or secure handling. Environment variables can be exposed in process listings or core dumps. **Perspective 9:** The create_adapter_from_env() function loads Snowflake credentials directly from environment variables without validation. An attacker with the ability to set environment variables (e.g., through compromised deployment scripts) could inject malicious credentials or redirect connections to attacker-controlled Snowflake instances. **Perspective 10:** The `create_adapter_from_env` function reads credentials from environment variables without validation. Missing or malformed credentials will cause errors later, but there's no early validation or helpful error messages. **Perspective 11:** generate_proof_bundle() serializes entire schema IR and rowcount data to JSON strings for hashing. For schemas with many tables/columns, this can consume significant memory.
Suggested Fix
Add build environment fingerprinting and verification that the same inputs produce identical outputs. Include dependency versions and build tool versions in the reproducibility check.
CRITICALHardcoded SQLite database path with potential sensitive data
core/database_manager.py:106
[AGENTS: Lockdown, Vault]configuration, secrets
**Perspective 1:** The SQLiteAdapter uses a default database path 'data/lore_store.db' which may contain sensitive application data. While not a traditional credential, database files can contain sensitive information and should be properly secured. **Perspective 2:** The SQLite adapter configuration sets a default timeout of 30 seconds, which may be too short for concurrent operations or complex queries, potentially causing unnecessary lock timeouts.
Suggested Fix
Use environment variable for database path, ensure proper file permissions (600), and consider encryption for sensitive data storage.
HIGHMissing dependency integrity verification for GGUF model
Copilot_Carl/Copilot_Carl.gguf.txt:1
[AGENTS: Supply]supply_chain
The documentation instructs users to download a GGUF model from HuggingFace but provides no integrity verification (checksums, signatures) for the downloaded artifact. This allows supply chain attacks where malicious models could be substituted.
Suggested Fix
Add SHA256 checksums for the recommended model in the documentation and implement verification in the download script.
HIGHUnpinned Flask dependency with CORS support
Copilot_Carl/carl_server.py:37
[AGENTS: Tripwire]dependencies
The carl_server.py imports Flask and Flask-CORS without version constraints. Flask-CORS is a security-critical dependency that controls cross-origin resource sharing. Unpinned versions could introduce breaking changes or security vulnerabilities in CORS configuration.
Suggested Fix
Add version constraints to requirements.txt or pyproject.toml: Flask>=2.3.0,<3.0.0 and Flask-CORS>=4.0.0,<5.0.0
HIGHModel loading with trust_remote_code=True is dangerous
Copilot_Carl/carl_training/train_carl_lite.py:104
[AGENTS: Chaos]edge_cases
trust_remote_code=True allows execution of arbitrary code from the model repository. This is a significant security risk if the model comes from untrusted source.
Suggested Fix
Only use trust_remote_code=False with verified models, or implement code signing/verification.
HIGHDirect DOM manipulation with user-controlled content
Copilot_Carl/chat.html:577
[AGENTS: Blacklist]output_encoding
The JavaScript code directly sets innerHTML with user-controlled content after minimal processing. The regex-based markdown parsing is insufficient to prevent XSS attacks through crafted messages containing malicious HTML/JavaScript.
Suggested Fix
Use textContent instead of innerHTML for user messages, or implement a proper sanitizer like DOMPurify before setting innerHTML.
HIGHHardcoded PostgreSQL credentials in benchmark
benchmarks/lsm_vs_postgresql.py:114
[AGENTS: Razor]security
The benchmark connects to PostgreSQL with hardcoded credentials: user='postgres', password='postgres'. This is a default weak password that should never be used in production or test code that could be deployed.
Suggested Fix
Use environment variables or configuration files for credentials. At minimum, use strong random passwords.
HIGHHardcoded PostgreSQL Credentials in Benchmark
benchmarks/lsm_vs_postgresql.py:123
[AGENTS: Phantom]authentication
The PostgreSQL benchmark function contains hardcoded credentials: user='postgres', password='postgres'. These are default credentials that should never be used in production or testing environments.
Suggested Fix
Use environment variables or configuration files for database credentials. Never hardcode credentials in source code.
HIGHAtlasIndexManager lacks tenant isolation for vector and metadata indexes
core/atlas/index_manager.py
[AGENTS: Tenant]tenant_isolation
The AtlasIndexManager stores chunks and vectors from all tenants in shared indexes (MetadataIndex, LexicalIndex, VectorIndex, VisionVectorIndex). There is no tenant filtering in search operations, allowing users from one tenant to retrieve chunks and vectors from other tenants.
Suggested Fix
Add tenant field to LoreChunk metadata and include tenant filtering in all index operations. Modify filter_by_metadata() to automatically include tenant filter and ensure search methods respect tenant boundaries.
HIGHMissing integrity verification for embedding models
core/atlas/index_manager.py:74
[AGENTS: Supply]supply_chain
The _get_embedder() method loads sentence-transformers models without verifying model integrity, checksums, or signatures. This allows model substitution attacks.
Suggested Fix
Add model integrity verification with pinned model hashes and signature verification before loading.
HIGHVector index brute-force search with unbounded O(N) complexity and no cost limits
core/atlas/index_manager.py:562
[AGENTS: Wallet]denial_of_wallet
The VectorIndex.search() method performs O(N) brute-force similarity searches without any cost controls. The class warns about exceeding MAX_VECTORS_BRUTE_FORCE (50,000) but doesn't enforce limits. An attacker could trigger expensive vector similarity computations across large datasets.
Suggested Fix
Enforce hard limits on search size, implement approximate nearest neighbor search for large indexes, and add query cost tracking.
HIGHDatabaseManager lacks tenant isolation across all backends
core/database_manager.py
[AGENTS: Tenant]tenant_isolation
The DatabaseManager provides a unified interface for multiple database backends (SQLite, PostgreSQL, MySQL, etc.) but does not include tenant context in any queries. All adapters (SQLiteAdapter, PostgreSQLAdapterWrapper, MySQLAdapterWrapper, etc.) execute queries without tenant filtering, allowing cross-tenant data access.
Suggested Fix
Add tenant_id parameter to execute_query() and execute_transaction() methods and propagate it to all adapters. Ensure each adapter includes tenant filtering in generated SQL.
HIGHUnified database manager creates single point of failure for credential harvesting
core/database_manager.py:69
[AGENTS: Vector]attack_chains
The DatabaseManager centralizes access to multiple database backends with their credentials. An attacker who compromises the manager gains access to all configured databases (SQLite, PostgreSQL, MySQL, Oracle, MSSQL, BigQuery). This creates a credential harvesting bonanza and enables lateral movement across all database systems.
Suggested Fix
Implement per-backend authentication, credential isolation, and require separate authentication for each backend.
HIGHSQL injection in SQLiteAdapter execute_query method
core/database_manager.py:327
[AGENTS: Prompt]llm_security
The SQLiteAdapter.execute_query method uses parameterized queries when params is provided, but uses direct execution when params is None: `cursor.execute(sql)`. This allows SQL injection if untrusted input is part of the SQL string.
Suggested Fix
Always use parameterized queries. For queries without parameters, use cursor.execute(sql, ()) with an empty tuple instead of cursor.execute(sql).
HIGHSQL injection in SQLiteAdapter execute_transaction method
core/database_manager.py:414
[AGENTS: Prompt]llm_security
The execute_transaction method in SQLiteAdapter executes multiple SQL operations. Each operation's SQL is executed with cursor.execute(sql, params) if params exists, but if params is None, it uses cursor.execute(sql) directly, making it vulnerable to SQL injection.
Suggested Fix
Always use parameterized queries even when params is None. Use cursor.execute(sql, ()) for queries without parameters.
HIGHHash collision attack vulnerability
core/hash_index.py:86
[AGENTS: Siege]dos
The hash index uses Python's built-in hash() function which is not cryptographically secure and vulnerable to hash collision attacks. An attacker could craft keys that cause many collisions, degrading performance to O(n).
Suggested Fix
Use a cryptographically secure hash function with randomization or implement collision limits per bucket.
HIGHUnbounded hash table creation without memory limits
core/join_engine.py:131
[AGENTS: Siege]dos
HashJoinExecutor._build_hash_table creates hash tables from arbitrary-sized datasets without memory limits. An attacker could provide large datasets to exhaust memory.
Suggested Fix
Add dataset size limit: if len(data) > MAX_ROWS_PER_JOIN: raise ValueError('Dataset too large for hash join')
HIGHLogging system captures user IDs and session data without consent
core/logging.py:378
[AGENTS: Warden]privacy
The LogContext class stores user_id, session_id, and request_id which are PII. The EnterpriseLogger logs these fields in structured logs without explicit user consent or data retention controls.
Suggested Fix
Implement consent tracking for logging PII. Add configuration options to anonymize or exclude PII from logs. Implement data retention policies for log records containing PII.
HIGHQuantumProbabilisticIndex lacks tenant isolation for vector storage and search
core/qipi_index.py
[AGENTS: Tenant]tenant_isolation
The QIPI index stores vectors and keys in a global namespace without tenant isolation. insert() and search() methods do not include tenant context, allowing cross-tenant data leakage. The save_bundle and load_bundle also lack tenant separation.
Suggested Fix
Add tenant_id parameter to insert, search, and search_vector methods. Prefix keys with tenant_id. Ensure vector storage is partitioned by tenant.
HIGHKnowledgeBase lacks tenant isolation for document chunks and vector search
core/rag.py
[AGENTS: Tenant]tenant_isolation
The KnowledgeBase loads all document chunks from an index file without tenant isolation. When querying, it returns chunks from all tenants. The QIPI index and vector search also lack tenant scoping, potentially returning another tenant's documents in search results.
Suggested Fix
Add tenant_id field to DocumentChunk. Modify KnowledgeBase to filter chunks by tenant_id. Ensure QIPI index keys include tenant prefix and vector searches are scoped to tenant.
HIGHSQL injection vulnerability in _format_sql_value
core/symbolic_engine.py:81
[AGENTS: Sanitizer]sanitization
The _format_sql_value method uses basic string escaping (doubling single quotes) which is insufficient and can be bypassed with encoding or alternative quote characters. This method is used when building SQL queries.
Suggested Fix
Use parameterized queries instead of string formatting. Replace all uses of _format_sql_value with proper parameter binding.
HIGHVector engine embedding generation without token or size limits
core/vector_engine.py:128
[AGENTS: Wallet]denial_of_wallet
The generate_embeddings method accepts a list of texts with no limits on total characters or tokens. When using paid services like OpenAI embeddings, this could lead to unbounded API costs. Even with local models, large inputs consume significant GPU/CPU resources.
Suggested Fix
Add max_texts, max_total_chars, and max_tokens parameters. Truncate or reject inputs exceeding limits. Implement per-user or per-session embedding budget caps.
HIGHProduction configuration binds to 0.0.0.0 without authentication
deployment/config/production.json:7
[AGENTS: Razor]security
The production configuration file sets 'host': '0.0.0.0' exposing the database to all network interfaces. Combined with potentially weak authentication, this creates a significant attack surface.
Suggested Fix
Change default to '127.0.0.1' and require explicit configuration for external access with authentication requirements documented.
HIGHEncryption disabled in production configuration
deployment/config/production.json:35
[AGENTS: Gatekeeper]auth
The production configuration has 'enable_encryption' set to false, which would disable encryption for data in transit and at rest in a production environment.
Suggested Fix
Set 'enable_encryption' to true and configure proper TLS certificates.
HIGHKubernetes service exposes database port externally via LoadBalancer without TLS
deployment/kubernetes/saiql-deployment.yaml:27
[AGENTS: Gateway]edge_security
The saiql-external Service of type LoadBalancer exposes port 5432 externally. The configuration does not enforce TLS termination at the edge (ingress or service mesh). The internal container does not have TLS enabled (security.enable_encryption=false in ConfigMap). This exposes database traffic in plaintext over the public internet.
Suggested Fix
Remove the LoadBalancer service or replace it with an Ingress with TLS termination. Enable TLS in the ConfigMap (security.enable_encryption=true) and require client certificate authentication for external connections.
HIGHKubernetes configuration disables authentication and encryption
deployment/kubernetes/saiql-deployment.yaml:217
[AGENTS: Razor]security
The Kubernetes ConfigMap sets 'enable_authentication': false and 'enable_encryption': false, completely disabling security mechanisms in what appears to be a production configuration.
Suggested Fix
Enable authentication and encryption by default, or require explicit justification for disabling security features.
HIGHKubernetes configuration allows all hosts and CORS origins
deployment/kubernetes/saiql-deployment.yaml:220
[AGENTS: Razor]security
The configuration sets 'allowed_hosts': ["*"] and 'cors_origins': ["*"] which completely disables host validation and CORS protection, allowing any origin to access the database API.
Suggested Fix
Restrict allowed hosts to specific domains and implement proper CORS policy.
HIGHAuthentication disabled in Kubernetes production configuration
deployment/kubernetes/saiql-deployment.yaml:229
[AGENTS: Gatekeeper]auth
The Kubernetes ConfigMap for production has 'enable_authentication' set to false and 'enable_encryption' set to false, exposing the database without any authentication or encryption.
Suggested Fix
Set both 'enable_authentication' and 'enable_encryption' to true in the Kubernetes ConfigMap.
HIGHEncryption disabled in Kubernetes production configuration
deployment/kubernetes/saiql-deployment.yaml:230
[AGENTS: Gatekeeper]auth
The Kubernetes ConfigMap for production has 'enable_encryption' set to false, exposing data in transit and at rest.
Suggested Fix
Set 'enable_encryption' to true and configure TLS certificates.
HIGHAuthentication and encryption disabled in production
deployment/kubernetes/saiql-deployment.yaml:235
[AGENTS: Lockdown]configuration
Security configuration has enable_authentication and enable_encryption set to false, which exposes the database to unauthorized access and data interception.
Suggested Fix
Enable authentication and encryption for production deployments. Use proper TLS certificates and authentication mechanisms.
HIGHOverly permissive CORS and allowed hosts configuration
deployment/kubernetes/saiql-deployment.yaml:240
[AGENTS: Lockdown]configuration
CORS origins and allowed hosts are set to '*' (wildcard), allowing any origin to access the API and any host to connect, which is a significant security risk.
Suggested Fix
Restrict CORS origins and allowed hosts to specific, trusted domains. Use environment variables for configuration.
HIGHDefault admin credentials in quick start
docs/Owners_Manual/00_Quick_Start.md:93
[AGENTS: Warden]privacy
Quick start guide uses hardcoded admin credentials (username: admin, password: admin_password) without warning about changing them. Creates privacy risk if deployed without modification.
Suggested Fix
Add warning: 'CHANGE DEFAULT CREDENTIALS IMMEDIATELY AFTER FIRST LOGIN. Generate secure password: openssl rand -base64 32'
HIGHInsecure firewall configuration recommendation
docs/Owners_Manual/01_Ubuntu_Prep.md:54
[AGENTS: Lockdown]configuration
Documentation suggests allowing port 8000 for external access without TLS, which exposes the API without encryption.
Suggested Fix
Remove external access recommendation or explicitly require TLS and reverse proxy configuration before external access.
HIGHMissing dependency integrity verification
docs/Owners_Manual/02_Install.md:12
[AGENTS: Supply]supply_chain
Installation instructions use 'pip install -r requirements.txt' without verifying checksums or signatures of downloaded packages. This allows for supply chain attacks where malicious packages could be substituted.
Suggested Fix
Add checksum verification: 'pip install --require-hashes -r requirements.txt' and maintain SHA256 hashes for all dependencies in requirements.txt
HIGHInadequate Backup Verification Procedures
docs/Owners_Manual/11_Production_Operations.md:34
[AGENTS: Compliance]regulatory
Backup procedures lack verification, testing, and recovery testing requirements. SOC 2 CC3.2 requires testing of backup and recovery capabilities. PCI-DSS Requirement 9.5 requires protection of backup media. No mention of backup integrity checks or recovery testing schedules.
Suggested Fix
Add backup verification procedures, quarterly recovery testing, encryption of backup media, and off-site storage requirements.
HIGHBackup files contain unencrypted sensitive data
docs/Owners_Manual/11_Production_Operations.md:54
[AGENTS: Warden]privacy
Backup procedures show copying database files directly without encryption. SQLite and PostgreSQL dumps will contain all PII in plaintext if database contains sensitive data.
Suggested Fix
Add encryption step: 'Encrypt backup files using GPG or similar before storage. Example: gpg --symmetric --cipher-algo AES256 backup_file.db'
HIGHPermissive CORS configuration
docs/Owners_Manual/14_Reference.md:36
[AGENTS: Lockdown]configuration
Default CORS configuration allows all origins ("*"), which is insecure and could lead to CSRF attacks.
Suggested Fix
Change default to specific origins or implement proper CORS validation with allowed domains list.
HIGHInsufficient Encryption Documentation
docs/guides/PRODUCTION_DEPLOYMENT_GUIDE.md:107
[AGENTS: Compliance]regulatory
Security section mentions encryption but lacks specific algorithms, key management, and key rotation requirements. PCI-DSS Requirement 3.4 requires strong cryptography for cardholder data. No mention of AES-256, TLS 1.2+, or key management procedures.
Suggested Fix
Specify encryption requirements: AES-256 for data at rest, TLS 1.3 for data in transit, key rotation every 1-2 years, and secure key storage.
HIGHInsecure example with hardcoded credentials
docs/guides/PRODUCTION_DEPLOYMENT_GUIDE.md:115
[AGENTS: Razor]security
The migration examples show hardcoded database credentials in command lines: '--user myuser --password mypass'. This exposes credentials in shell history and process listings.
Suggested Fix
Recommend using environment variables, credential files, or interactive prompts for passwords. Show secure patterns.
HIGHUnpinned google-cloud-bigquery dependency
extensions/plugins/bigquery_adapter.py:37
[AGENTS: Tripwire]dependencies
The code imports 'google.cloud.bigquery' and related Google Cloud libraries without version constraints. These libraries have frequent updates and breaking changes.
Suggested Fix
Pin google-cloud-bigquery and related dependencies to specific versions, e.g., 'google-cloud-bigquery>=3.0.0,<4.0.0'
HIGHUnpinned google-auth dependency
extensions/plugins/bigquery_adapter.py:39
[AGENTS: Tripwire]dependencies
The code imports 'google.oauth2' and 'google.auth' without version constraints. Authentication libraries require strict versioning for security.
Suggested Fix
Pin google-auth to a specific version, e.g., 'google-auth>=2.0.0,<3.0.0'
HIGHInsufficient Secret Rotation Policy Documentation
extensions/plugins/db2_adapter.py:13
[AGENTS: Compliance]regulatory
The Db2Config class reads credentials from environment variables but lacks documentation on secret rotation policies required by SOC 2 and PCI-DSS. No guidance on rotation frequency, secure storage, or monitoring.
Suggested Fix
Document secret rotation requirements including: rotation frequency, secure storage practices, automated rotation procedures, and expiration monitoring.
HIGHSQL injection in list_tables method
extensions/plugins/db2_adapter.py:114
[AGENTS: Razor]security
The list_tables method directly interpolates the schema parameter into the SQL query without proper escaping or parameterization, allowing SQL injection.
Suggested Fix
Use parameterized queries or proper escaping.
HIGHSQL injection in describe_table method
extensions/plugins/db2_adapter.py:145
[AGENTS: Razor]security
The describe_table method directly interpolates schema and table name into SQL queries without proper escaping or parameterization, enabling SQL injection.
Suggested Fix
Use parameterized queries.
HIGHSQL injection in list_indexes method
extensions/plugins/db2_adapter.py:163
[AGENTS: Razor]security
The list_indexes method directly interpolates schema and table name into the SQL query without proper escaping or parameterization, allowing SQL injection.
Suggested Fix
Use parameterized queries.
HIGHSQL injection in _get_view_definition method
extensions/plugins/db2_adapter.py:226
[AGENTS: Razor]security
The _get_view_definition method directly interpolates schema and view name into the SQL query without proper escaping or parameterization, enabling SQL injection.
Suggested Fix
Use parameterized queries.
HIGHSQL injection in export_data_ir method
extensions/plugins/db2_adapter.py:349
[AGENTS: Razor]security
The export_data_ir method builds SQL queries by directly interpolating schema and table names without proper escaping. The order_by clause is also interpolated without validation, allowing SQL injection.
Suggested Fix
Use parameterized queries and validate/escape all identifiers.
HIGHSQL injection in create_table_from_ir method
extensions/plugins/db2_adapter.py:378
[AGENTS: Razor]security
The create_table_from_ir method builds CREATE TABLE statements by directly interpolating schema, table, and column names without proper escaping, allowing SQL injection.
Suggested Fix
Properly escape all identifiers or use parameterized DDL where supported.
HIGHSQL injection in describe_table method via table_name and schema parameters
extensions/plugins/db2_adapter.py:414
[AGENTS: Prompt]llm_security
The describe_table method directly interpolates both table_name and schema parameters into SQL queries without proper escaping, creating SQL injection vulnerabilities.
Suggested Fix
Use parameterized queries or properly escape both identifiers.
HIGHSQL injection in load_data_from_ir method
extensions/plugins/db2_adapter.py:418
[AGENTS: Razor]security
The load_data_from_ir method builds INSERT statements by directly interpolating schema and table names without proper escaping. While values are parameterized, identifiers are not, allowing SQL injection.
Suggested Fix
Properly escape database and table names.
HIGHSQL injection vulnerability in list_tables method
extensions/plugins/db2_adapter.py:424
[AGENTS: Infiltrator]attack_surface
The list_tables method uses string interpolation to embed schema names directly into SQL queries without proper escaping.
Suggested Fix
Use parameterized queries for all catalog queries.
Note: Fixing issues can create a domino effect — resolving one finding often surfaces new ones that were previously hidden. Multiple scan-and-fix cycles may be needed until you’re satisfied no further issues remain. How deep you go is your call.