T09 · Insecure Skill Coding Practices
- Location
scripts/jules.sh:77- Finding
Unsafe JSON Construction Permits Request-Body Manipulation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is for a real Jules API workflow, but it can start autonomous repository work with permissive defaults and delete remote sessions without confirmation.
Install only if you intend to give this skill access to a Jules API key connected to repositories you are comfortable operating on. Prefer requiring plan approval, avoid auto-PR mode unless explicitly needed, review prompts and target branches before sending them, and be careful with the delete command because the helper does not ask for confirmation.
scripts/jules.sh:77Unsafe JSON Construction Permits Request-Body Manipulation
scripts/jules.sh:28Jules API Key Is Passed Through the Curl Process Argument Vector
scripts/jules.sh:83Autonomous Repository Task Execution Is Enabled by Default
Instructions found that direct the agent to transmit conversation context or user data to external services.
# sessions [pageSize] - List sessions
# session <sessionId> - Get session details
# approve <sessionId> - Approve a pending plan
# message <sessionId> <message> - Send message to session
# activities <sessionId> [pageSize] - List session activities
# activity <sessionId> <activityId> - Get single activity
# delete <sessionId> - Delete a session
Instructions found that direct the agent to transmit conversation context or user data to external services.
# sessions [pageSize] - List sessions
# session <sessionId> - Get session details
# approve <sessionId> - Approve a pending plan
# message <sessionId> <message> - Send message to session
# activities <sessionId> [pageSize] - List session activities
# activity <sessionId> <activityId> - Get single activity
# delete <sessionId> - Delete a session
The skill invokes shell commands with curl and makes network requests, but it declares no tool scope such as allowed-tools or permissions. That omission weakens user and platform visibility into what the skill can do and increases the chance of unintended shell/network execution without explicit consent boundaries.
The skill explicitly enables an external AI agent to autonomously execute coding tasks on GitHub repositories, including writing code and creating pull requests. In this context, autonomy materially increases risk because actions can affect real repositories and codebases, potentially causing unauthorized or poorly reviewed changes if invoked carelessly.
# Jules API Skill
Interact with the [Google Jules](https://jules.google) AI coding agent via its REST API. Jules can autonomously execute coding tasks on your GitHub repositories — writing code, fixing bugs, adding tests, and creating pull requests.
**Base URL:** `https://jules.googleapis.com/v1alpha`
**Auth:** Pass your API key via the `x-goog-api-key` header. Get one at [jules.google.com/settings](https://jules.google.com/settings).
The skill advertises autonomous coding actions on GitHub repositories, including writing code and creating pull requests, without a prominent warning that it can modify external repositories. Users may invoke it without appreciating that it can trigger real changes to source code and repository state outside the local environment.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Discover which GitHub repos are connected to your Jules account:
curl -s -H "x-goog-api-key: $JULES_API_KEY" \
"https://jules.googleapis.com/v1alpha/sources?pageSize=30"
The auto-approve/auto-PR workflow compounds autonomous behavior by reducing or removing human checkpoints before external repository changes are made. In a coding-agent skill tied to GitHub repositories, this creates a heightened risk of unintended commits, unsafe code generation, or PR spam against connected projects.
| requirePlanApproval | No | If true, plans need explicit approval before execution |
| automationMode | No | Set to AUTO_CREATE_PR to auto-create PRs when done |
curl -s -X POST \
The auto-create PR example encourages fully automated external repository modification without an adjacent warning about the consequences. This is dangerous because it normalizes unattended code changes and PR creation against connected repositories, which can lead to accidental or inappropriate modifications.
This POST request sends task prompts and repository context to an external AI coding service that can act on connected repositories and create PRs. In context, the danger is not mere transmission but transmission coupled with automated remote code modification, especially in an example that omits strong warnings or safer gating defaults.
curl -s -X POST \
-H "x-goog-api-key: $JULES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
When a session is in AWAITING_PLAN_APPROVAL state, approve the plan:
curl -s -X POST \
-H "x-goog-api-key: $JULES_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
The delete-session command documents a destructive API action without warning that deletion may be irreversible and may remove history or artifacts needed for auditability. Even if limited to sessions rather than repository code, destructive operations should be clearly labeled to reduce accidental loss.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Helper: make GET request
get() {
curl -s -H "$AUTH_HEADER" "$1"
}
# Helper: make POST request with JSON body
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
echo "Usage: jules.sh create <sourceId> <branch> <prompt> [title] [--approve] [--auto-pr]" >&2
echo " sourceId: e.g. github-owner-repo" >&2
echo " branch: e.g. main" >&2
echo " --approve: require plan approval (default: auto-approve)" >&2
echo " --auto-pr: auto-create PR when done" >&2
exit 1
fi
The delete command issues an HTTP DELETE request for a session immediately after checking that a session ID was provided. There is no confirmation prompt, cautionary message, or other user-facing disclosure near this destructive operation, despite it being irreversible from the user's perspective.
No suspicious patterns detected.