T09 · Insecure Skill Coding Practices
- Location
scripts/idp_evidence.py:298- Finding
Okta API Token Can Be Transmitted to an Arbitrary HTTPS Host
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears to do the promised identity-provider compliance checks, but it needs Review because its setup can expose highly privileged Google Workspace and Okta access and stores detailed user security posture locally.
Install only after creating dedicated least-privilege Google Workspace and Okta service identities, removing the unused Google audit-report scope, restricting OKTA_ORG_URL to your exact tenant, protecting and rotating tokens, and accepting that the local GRC database will contain identifiable user security-posture data.
scripts/idp_evidence.py:298Okta API Token Can Be Transmitted to an Arbitrary HTTPS Host
SKILL.md:97Unused Google Audit-Report Scope Is Requested During Setup
SKILL.md:108Okta Setup Can Produce an Overprivileged Inherited-Permission Token
scripts/idp_evidence.py:62Identifiable User Security Posture Is Persisted Without Data Minimization
scripts/requirements.txt:1Required Okta SDK Dependency Is Not Declared
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
token = os.environ["OKTA_API_TOKEN"]
headers = {"Authorization": f"SSWS {token}", "Accept": "application/json"}
# Test user endpoint
resp = requests.get(f"{org_url}/api/v1/users?limit=1", headers=headers, timeout=10)
if resp.status_code == 200:
results.append({"service": "Okta Auth", "status": "ok", "detail": "credentials valid"})
results.append({"service": "Okta Users API", "status": "ok", "detail": "accessible"})
The skill is described as performing read-only compliance checks, but the documented behavior includes writing evidence and integration status into a shared SQLite database and invoking an external helper to do so. This discrepancy can mislead operators into granting trust under a read-only assumption when the skill in fact mutates local state and interacts with another script, expanding the attack surface and enabling unintended data tampering or persistence.
The README tells users to place sensitive credentials into environment variables, including an Okta API token and a path to a Google Workspace service-account key, but gives no guidance on secure handling, storage, rotation, or avoiding shell history and accidental disclosure. While using environment variables is common, documenting secret setup without safety warnings increases the chance of credential exposure through shared shells, process inspection, logs, screenshots, or copied command history.
The skill advertises executable behavior with access to environment variables, network APIs, and shell execution, but does not declare an explicit tool scope such as permissions or allowed-tools. That omission weakens reviewability and enforcement because consumers cannot easily tell what capabilities the skill expects, increasing the risk of overbroad execution or hidden capability abuse if the implementation changes.
The security model claims Google Workspace uses only the admin.directory.user.readonly scope, while the setup instructions additionally require admin.reports.audit.readonly. Inconsistent scope documentation can cause underestimation of privilege, making reviewers and operators believe the integration is less sensitive than it really is and potentially approving broader access without proper scrutiny.
The manifest describes '8 read-only checks' across Google Workspace and Okta, which implies observation-only behavior. In addition to running checks, this script inserts evidence records into the database and updates integration status fields, which are state-changing write operations outside a purely read-only checking role.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"--file-content", json.dumps(result, default=str),
]
proc = subprocess.run(cmd, capture_output=True, text=True)
if proc.returncode != 0:
return _store_evidence_direct(db_path, check_name, result)
The file pins requests to version 2.31.0, which is identified by the static analysis as having multiple published advisories, including credential leakage and TLS verification/session handling issues. In an identity-provider auditing skill that likely makes authenticated outbound HTTP requests to Google or Okta APIs, a vulnerable HTTP client library increases the risk of token, credential, or response-handling compromise.
The top-level documentation describes running compliance checks and storing evidence, but omits that the script also mutates the integrations table by changing status, timestamps, and error counters. Because the documentation frames the behavior more narrowly than the code's actual state changes, it creates an intent/code mismatch for operators reviewing what the script affects.
No suspicious patterns detected.