Back to skill

Security audit

tracking-hiring-signals-from-company-tweets

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Apify/Twitter hiring-signal workflow, with an avoidable token-handling risk in its REST fallback example.

Before installing, be comfortable sending your chosen Twitter/X search terms to Apify and using an Apify token. Prefer the MCP/helper flow or an Authorization header instead of the REST fallback URL shown with ?token=$APIFY_TOKEN, and use a least-privilege token where possible.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:104
Finding

Apify API Token Exposed in URL Query Parameter

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 104
Vulnerability Type: Credential exposure through a URL query parameter
Risk Level: Medium

Vulnerable Code

bash
curl -X POST   "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{
    "searchTerms": ["we are hiring fintech", "join our team SaaS startup", "software engineer hiring"],
    "maxItems": 300
  }'

Technical Analysis

The documented REST fallback expands APIFY_TOKEN directly into a URL query parameter. URLs may be recorded by shell or process-monitoring systems, HTTP clients, proxies, gateways, observability platforms, and server access logs. Query strings are commonly retained in logs and telemetry, potentially making the credential accessible to users or systems that should not possess it.

Although HTTPS protects the URL while it is transmitted over the network, it does not prevent exposure at the originating host, intermediary application layers, or destination logging systems.

Attack Path

  1. A user sets APIFY_TOKEN and executes the documented curl command.
  2. The shell expands $APIFY_TOKEN into the command-line URL.
  3. A local user with process-inspection access, or a logging and monitoring component, captures the complete URL.
  4. The observer extracts the token from the token query parameter.
  5. The observer reuses the token against Apify APIs within the permissions assigned to that credential.

Impact Assessment

A compromised token could allow an attacker to invoke Apify actors, consume account resources, incur usage charges, and access actor runs, datasets, or other Apify resources authorized for the token. The exact scope is limited by the token's configured permissions and the associated account privileges.

No evidence of deliberate credential theft, persistence, hidden payload execution, or other malicious behavior was identified in the audited file.

Remediation
View remediation

Remediation Suggestions

Pass the API token through an authorization header rather than embedding it in the URL:

bash
curl -X POST \
  "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchTerms": [
      "we are hiring fintech",
      "join our team SaaS startup",
      "software engineer hiring"
    ],
    "maxItems": 300
  }'

Additional hardening measures:

  • Configure the token with the minimum permissions required for actor execution.
  • Avoid printing, logging, or persisting authorization headers.
  • Redact credentials in command tracing, diagnostics, and observability systems.
  • Rotate the existing token if the documented command has already been used in environments where process arguments or complete URLs may have been retained.
  • Store the token in a protected environment variable or secret manager rather than a committed .env file.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 104)May include surrounding context.

REST API fallback:

bash
curl -X POST   "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{
    "searchTerms": ["we are hiring fintech", "join our team SaaS startup", "software engineer hiring"],
    "maxItems": 300
  }'

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 104)May include surrounding context.

REST API fallback:

bash
curl -X POST   "https://api.apify.com/v2/acts/apidojo~tweet-scraper/runs?token=$APIFY_TOKEN"   -H "Content-Type: application/json"   -d '{
    "searchTerms": ["we are hiring fintech", "join our team SaaS startup", "software engineer hiring"],
    "maxItems": 300
  }'

Static analysis

No suspicious patterns detected.