Back to skill

Security audit

HTTP Request Builder

Security checks for vulnerabilities and agentic risk

Overview

This HTTP request tool is coherent, but it needs review because it can store API tokens, headers, and request bodies in plaintext local history and template files.

Review before installing if you plan to use real credentials. Avoid saving templates or history entries that contain Authorization, Cookie, API-key headers, bearer tokens, passwords, or sensitive bodies; prefer short-lived tokens and rotate any secret already used with this tool. Treat files under ~/.http-request-builder/ as sensitive, and avoid untrusted template names because they are used directly in file paths.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/main.py:53
Finding

Bearer Tokens and Authorization Headers Persisted in Plaintext

Content
View full analysis
None: """Save request history to file.""" # Keep only last 100 entries if len(history) > 100: history = history[-100:] try: with open(HISTORY_FILE, 'w') as f: json.dump(history, f, indent=2) except IOError as e: print(f"Warning: Could not save history: {e}") ``` ```python request_data = { "method": method, "url": url, "headers": headers, "timestamp": datetime.now(timezone.utc).isoformat() } ``` ```python # Add to history add_to_history(request_data, { "status_code": response.status_code, "reason": response.reason, "elapsed_ms": response_data["elapsed_ms"] }) ``` ```python elif args.auth == "bearer" and args.token: headers["Authorization"] = f"Bearer {args.token}" # ... if args.save_template: request_data = { "method": "GET", "url": args.url, "headers": headers, "auth": args.auth, "username": args.username if args.auth == "basic" else None, "token": args.token if args.auth == "bearer" else None } save_template(args.save_template, request_data) ``` ```python def save_template(name: str, request_data: Dict[str, Any]) -> bool: """Save a request as a template.""" template_file = TEMPLATES_DIR / f"{name}.json" try: with open(template_file, 'w') as f: json.dump(request_data, f, indent=2) ``` ### Technical Analysis Bearer authentication inserts the token into the request's `Authorization` header. The complete header dictionary is then included in `request_data` and serialized to `~/.http-request-builder/history.json`. Arbitrary sensitive headers supplied through `--header`, including `Authori ...[truncated 1809 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/main.py:77
Finding

Template Name Path Traversal Enables File Access Outside the Template Directory

Content
View full analysis
Optional[Dict[str, Any]]: """Load a saved request template.""" template_file = TEMPLATES_DIR / f"{name}.json" if not template_file.exists(): return None try: with open(template_file, 'r') as f: return json.load(f) except (json.JSONDecodeError, IOError) as e: print(f"Error loading template '{name}': {e}") return None def save_template(name: str, request_data: Dict[str, Any]) -> bool: """Save a request as a template.""" template_file = TEMPLATES_DIR / f"{name}.json" try: with open(template_file, 'w') as f: json.dump(request_data, f, indent=2) print(f"Template saved: {name}") return True except IOError as e: print(f"Error saving template: {e}") return False ``` ### Technical Analysis The template name is controlled by the command-line user and is concatenated directly into a filesystem path. The code does not reject path separators or `..` components and does not resolve the resulting path to verify that it remains under `TEMPLATES_DIR`. For example, a name such as `../target` produces a path equivalent to: ```text ~/.http-request-builder/templates/../target.json ``` The save operation opens this path in write mode, truncating an existing file if one is present. The load operation can likewise open JSON files outside the intended template directory. Existing symbolic links are also followed because no symlink protections are used. The appended `.json` suffix limits the set of conveniently targeted filenames, and all access remains subject to the invoking user's filesystem permissions. Nevertheless, this violates the intended directory boundary and can overwrite or disclose user-accessible JSON files. # ...[truncated 1362 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/main.py:338
Finding

Passwords and Bearer Tokens Accepted as Process Command-Line Arguments

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (23)

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

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

View request history

python3 scripts/main.py history

Clear history

python3 scripts/main.py history --clear

text

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · scripts/main.py (reported line 411)May include surrounding context.

python
# View request history
python3 scripts/main.py history

# Clear history
python3 scripts/main.py history --clear
```

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Templates are saved directly to disk as JSON and later loaded for execution, and surrounding code stores tokens and request bodies in template data. This can expose bearer tokens, credentials, API payloads, or other secrets to other local users, backups, version control, or accidental file sharing if files are stored in plaintext without safeguards.

Content

No source excerpt is available for this finding.

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 · README.md (reported line 19)May include surrounding context.

bash
# Send a GET request
python3 scripts/main.py get https://api.example.com/data

# Send a POST request with JSON body
python3 scripts/main.py post https://api.example.com/api \

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 · README.md (reported line 22)May include surrounding context.

bash
# Send a GET request
python3 scripts/main.py get https://api.example.com/data

# Send a POST request with JSON body
python3 scripts/main.py post https://api.example.com/api \

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 · README.md (reported line 27)May include surrounding context.

bash
# Send a GET request
python3 scripts/main.py get https://api.example.com/data

# Send a POST request with JSON body
python3 scripts/main.py post https://api.example.com/api \

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 · README.md (reported line 31)May include surrounding context.

bash
# Send a GET request
python3 scripts/main.py get https://api.example.com/data

# Send a POST request with JSON body
python3 scripts/main.py post https://api.example.com/api \

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 · README.md (reported line 35)May include surrounding context.

bash
# Send a GET request
python3 scripts/main.py get https://api.example.com/data

# Send a POST request with JSON body
python3 scripts/main.py post https://api.example.com/api \

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 48)May include surrounding context.

bash
# Send a GET request
python3 scripts/main.py get https://api.example.com/data

# Send a POST request with JSON body
python3 scripts/main.py post https://api.example.com/api \

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 51)May include surrounding context.

bash
# Send a GET request
python3 scripts/main.py get https://api.example.com/data

# Send a POST request with JSON body
python3 scripts/main.py post https://api.example.com/api \

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 56)May include surrounding context.

bash
# Send a GET request
python3 scripts/main.py get https://api.example.com/data

# Send a POST request with JSON body
python3 scripts/main.py post https://api.example.com/api \

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 60)May include surrounding context.

bash
# Send a GET request
python3 scripts/main.py get https://api.example.com/data

# Send a POST request with JSON body
python3 scripts/main.py post https://api.example.com/api \

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 64)May include surrounding context.

bash
# Send a GET request
python3 scripts/main.py get https://api.example.com/data

# Send a POST request with JSON body
python3 scripts/main.py post https://api.example.com/api \

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 123)May include surrounding context.

bash
# Send a GET request
python3 scripts/main.py get https://api.example.com/data

# Send a POST request with JSON body
python3 scripts/main.py post https://api.example.com/api \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README explicitly notes that templates are unencrypted JSON files and that history is stored on disk, but it does not clearly warn users that authentication material such as Basic Auth credentials, bearer tokens, headers, or request bodies may be persisted in plaintext. In the context of an HTTP request builder that demonstrates passing secrets on the command line and saving templates/history, this omission can lead users to unintentionally store sensitive credentials where other local users, backups, or malware can read them.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly states that templates are stored as simple JSON files without encryption and demonstrates saving Authorization headers and authentication details in reusable templates, but it does not clearly warn users that credentials, headers, and request history may be written to disk in plaintext. This creates a real risk of token, password, or API key disclosure to other local users, backups, logs, or malware on the host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The tool automatically writes request metadata to a local history file without clear disclosure or controls. Even though the current history entry is reduced, URLs, headers, and timestamps can still expose API endpoints, query parameters, and operational details, which may contain sensitive data in real-world use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This function sends arbitrary HTTP requests, including authorization data and request bodies, to user-specified endpoints. While network transmission is core to the tool's purpose, there is no explicit warning in the code strings or help text that sensitive headers/body content and authentication data will be sent and partially recorded in history.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/main.py (reported line 225)May include surrounding context.

python
key, value = header.split(':', 1)
            headers[key.strip()] = value.strip()
    
    auth = None
    if args.auth == "basic" and args.username and args.password:
        auth = HTTPBasicAuth(args.username, args.password)
    elif args.auth == "bearer" and args.token:

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/main.py (reported line 254)May include surrounding context.

python
key, value = header.split(':', 1)
            headers[key.strip()] = value.strip()
    
    auth = None
    if args.auth == "basic" and args.username and args.password:
        auth = HTTPBasicAuth(args.username, args.password)
    elif args.auth == "bearer" and args.token:

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/main.py (reported line 306)May include surrounding context.

python
key, value = header.split(':', 1)
            headers[key.strip()] = value.strip()
    
    auth = None
    if args.auth == "basic" and args.username and args.password:
        auth = HTTPBasicAuth(args.username, args.password)
    elif args.auth == "bearer" and args.token:

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/main.py (reported line 445)May include surrounding context.

python
key, value = header.split(':', 1)
            headers[key.strip()] = value.strip()
    
    auth = None
    if args.auth == "basic" and args.username and args.password:
        auth = HTTPBasicAuth(args.username, args.password)
    elif args.auth == "bearer" and args.token:

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Template execution reloads and reuses saved authentication material, including bearer tokens, but the feature gives no meaningful warning that templates may persist secrets and replay them later. In a CLI that builds arbitrary HTTP requests, silent secret persistence and reuse materially increases the chance of credential leakage, accidental transmission to the wrong endpoint, or unsafe sharing of template files.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.