T09 · Insecure Skill Coding Practices
- Location
scripts/db_query.py:3032- Finding
Cloud Secrets Are Collected Through Chat and Exposed in Process Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent GRC tool, but it handles cloud and identity credentials in ways users should review carefully before installing.
Install only if you are comfortable with a local GRC database and local credential files under ~/.openclaw/grc. Do not paste cloud or identity-provider secrets into chat; prefer short-lived, read-only, provider-native auth and verify which account is being used before running scans. Run URL scanners only against domains you control, and review evidence ZIP contents before sharing them.
scripts/db_query.py:3032Cloud Secrets Are Collected Through Chat and Exposed in Process Arguments
scripts/check_headers.py:73Unrestricted URL Scanning Permits Server-Side Request Forgery
scripts/export_evidence.py:99Evidence Export Path Validation Can Be Bypassed by Prefix-Collision Paths
scripts/credential_store.py:214Configured Authentication Can Silently Fall Back to More Privileged Ambient Credentials
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
AuditClaw uses modern, secure authentication for all cloud integrations:
- **AWS**: IAM Roles with AssumeRole (no static access keys)
- **GitHub**: GitHub App tokens (no personal access tokens)
- **Azure**: Certificate-based service principals (no client secrets)
- **GCP**: Service account impersonation (no key files)
- **IDP**: OAuth 2.0 / domain-wide delegation
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
AuditClaw uses modern, secure authentication for all cloud integrations:
- **AWS**: IAM Roles with AssumeRole (no static access keys)
- **GitHub**: GitHub App tokens (no personal access tokens)
- **Azure**: Certificate-based service principals (no client secrets)
- **GCP**: Service account impersonation (no key files)
- **IDP**: OAuth 2.0 / domain-wide delegation
A description-behavior mismatch is dangerous because users and orchestrators rely on the manifest to understand runtime behavior and risk. If the underlying skill opens a local web server on port 8080 and primarily serves dashboard files without declaring that network-listening behavior, it introduces an undeclared attack surface, possible local data exposure, and bypasses informed consent for network capabilities.
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
{
"$schema": "framework-definition-v1",
"id": "hitrust",
"name": "HITRUST CSF v11",
"version": "11.0",
"description": "The HITRUST Common Security Framework (CSF) is a certifiable security framework that provides organizations with a comprehensive, flexible, and efficient approach to regulatory compliance and risk management. HITRUST CSF harmonizes the requirements of multiple authoritative sources including ISO 27001, NIST, HIPAA, PCI DSS, and COBIT to provide a unified framework for managing information risk across healthcare and other regulated industries.",
"domains": [
{
"id": "HITRUST-00",
"name": "Information Security Management Program",
"description": "Establish
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
{
"$schema": "framework-definition-v1",
"id": "hitrust",
"name": "HITRUST CSF v11",
"version": "11.0",
"description": "The HITRUST Common Security Framework (CSF) is a certifiable security framework that provides organizations with a comprehensive, flexible, and efficient approach to regulatory compliance and risk management. HITRUST CSF harmonizes the requirements of multiple authoritative sources including ISO 27001, NIST, HIPAA, PCI DSS, and COBIT to provide a unified framework for managing information risk across healthcare and other regulated industries.",
"domains": [
{
"id": "HITRUST-00",
"name": "Information Security Management Program",
"description": "Establish
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
{
"$schema": "framework-definition-v1",
"id": "hitrust",
"name": "HITRUST CSF v11",
"version": "11.0",
"description": "The HITRUST Common Security Framework (CSF) is a certifiable security framework that provides organizations with a comprehensive, flexible, and efficient approach to regulatory compliance and risk management. HITRUST CSF harmonizes the requirements of multiple authoritative sources including ISO 27001, NIST, HIPAA, PCI DSS, and COBIT to provide a unified framework for managing information risk across healthcare and other regulated industries.",
"domains": [
{
"id": "HITRUST-00",
"name": "Information Security Management Program",
"description": "Establish
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
{
"$schema": "framework-definition-v1",
"id": "hitrust",
"name": "HITRUST CSF v11",
"version": "11.0",
"description": "The HITRUST Common Security Framework (CSF) is a certifiable security framework that provides organizations with a comprehensive, flexible, and efficient approach to regulatory compliance and risk management. HITRUST CSF harmonizes the requirements of multiple authoritative sources including ISO 27001, NIST, HIPAA, PCI DSS, and COBIT to provide a unified framework for managing information risk across healthcare and other regulated industries.",
"domains": [
{
"id": "HITRUST-00",
"name": "Information Security Management Program",
"description": "Establish
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
{
"$schema": "framework-definition-v1",
"id": "hitrust",
"name": "HITRUST CSF v11",
"version": "11.0",
"description": "The HITRUST Common Security Framework (CSF) is a certifiable security framework that provides organizations with a comprehensive, flexible, and efficient approach to regulatory compliance and risk management. HITRUST CSF harmonizes the requirements of multiple authoritative sources including ISO 27001, NIST, HIPAA, PCI DSS, and COBIT to provide a unified framework for managing information risk across healthcare and other regulated industries.",
"domains": [
{
"id": "HITRUST-00",
"name": "Information Security Management Program",
"description": "Establish
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
},
{
"id": "CC6.2",
"title": "Controls access credentials",
"description": "Prior to issuing system credentials and granting system access, the entity registers and authorizes new internal and external users.",
"category": "Logical and Physical Access Controls",
"priority": 5,
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
},
{
"id": "CC6.2",
"title": "Controls access credentials",
"description": "Prior to issuing system credentials and granting system access, the entity registers and authorizes new internal and external users.",
"category": "Logical and Physical Access Controls",
"priority": 5,
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Auth precedence:
1. Stored IAM Role credential -> STS AssumeRole -> temporary session
2. Stored access key credential -> Session with explicit keys
3. Default boto3 Session (env vars, ~/.aws/credentials, instance profile)
Returns:
boto3.Session
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Auth precedence:
1. Stored IAM Role credential -> STS AssumeRole -> temporary session
2. Stored access key credential -> Session with explicit keys
3. Default boto3 Session (env vars, ~/.aws/credentials, instance profile)
Returns:
boto3.Session
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Determine filename based on auth method
filenames = {
"iam_role": "session.json",
"access_key": "credentials.json",
"github_app": "private-key.pem",
"personal_token": "token.txt",
"service_principal": "certificate.pem",
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"github_app": "private-key.pem",
"personal_token": "token.txt",
"service_principal": "certificate.pem",
"client_secret": "secret.txt",
"service_account": "key.json",
"sa_impersonation": "config.json",
"oauth2": "oauth.json",
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"api_token": "token.txt",
"domain_delegation": "sa-key.json",
}
filename = filenames.get(auth_method, "credential.json")
credential_path = _write_secret(provider, filename, secret_data)
conn = sqlite3.connect(db_path, timeout=10)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"api_token": "token.txt",
"domain_delegation": "sa-key.json",
}
filename = filenames.get(auth_method, "credential.json")
credential_path = _write_secret(provider, filename, secret_data)
conn = sqlite3.connect(db_path, timeout=10)
Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.
updates.append("updated_at = ?")
params.append(now)
params.append(response_id)
conn.execute(
f"UPDATE questionnaire_responses SET {', '.join(updates)} WHERE id = ?",
params
)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"github": {
"provider": "github",
"title": "GitHub Integration Setup",
"auth_method": "GitHub App (recommended) or Personal Access Token (legacy)",
"checks_unlocked": "9 compliance checks: branch protection, secret scanning, 2FA enforcement, Dependabot alerts, code scanning, license, CODEOWNERS, signed commits, audit logs",
"steps": [
{
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"github": {
"provider": "github",
"title": "GitHub Integration Setup",
"auth_method": "GitHub App (recommended) or Personal Access Token (legacy)",
"checks_unlocked": "9 compliance checks: branch protection, secret scanning, 2FA enforcement, Dependabot alerts, code scanning, license, CODEOWNERS, signed commits, audit logs",
"steps": [
{
The setup guide explicitly instructs users to send cloud credentials and secret values to the assistant in chat-style interactions. That is highly dangerous because it normalizes direct disclosure of privileged secrets into an LLM/tooling channel that may be logged, retained, or exposed beyond the intended recipient.
This section specifically asks the user to send full GCP service-account JSON key material to the assistant. A service-account key is a reusable bearer secret that can provide broad cloud access; exposing it through chat creates immediate risk of account compromise, persistence, and misuse far beyond the GRC function of the skill.
The identity-provider setup flow asks users to provide API tokens and admin key details via chat instructions. Those secrets often grant direct access to identity systems, making compromise especially severe because they can expose user directories, security policies, MFA state, and administrative actions.
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
3. Add the action name to the `ACTIONS` dispatch dictionary
4. Write tests in a new or existing test file
5. Update `skills/auditclaw-grc/references/db-actions.md` with the action reference
6. Add the command to the Quick Command Reference in `skills/auditclaw-grc/SKILL.md`
### Adding a New Framework
The markdown advertises 'Full CRUD' across compliance data and an 'Auto-generated Trust Center' but does not include any user-facing warning that these actions may create, modify, delete, or publish potentially sensitive organizational information. For a skill description, this omits disclosure about behaviors that could affect user data and privacy.
The skill declares executable installation and clearly instructs use of Python scripts, filesystem writes, network scans, environment-based cloud credentials, and shell commands, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates a policy/consent gap: an agent may invoke capabilities broader than a user expects, especially in a skill that can read secrets from env vars, write local databases, and make outbound requests.
No suspicious patterns detected.