ci: add Devin on-label automation workflow - #4520
ci: add Devin on-label automation workflow#4520devin-ai-integration[bot] wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 52802c6. Configure here.
| Title: ${{ github.event.issue.title }} | ||
|
|
||
| Body: | ||
| ${{ github.event.issue.body }} |
There was a problem hiding this comment.
Script injection via unsanitized user input in shell
High Severity
User-controlled values github.event.issue.body and github.event.issue.title are interpolated directly into run shell scripts via ${{ }} expressions. GitHub Actions expands these before the shell executes, so an attacker can craft an issue body containing EOF on its own line to terminate the heredoc and execute arbitrary commands — including exfiltrating the DEVIN_API_KEY secret. The title similarly breaks out of double quotes on the jq --arg line. These values need to be passed through env: blocks instead of inline interpolation.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 52802c6. Configure here.
| '{prompt:$prompt, title:$title, idempotent:true, | ||
| tags:["src:github","label:devin","repo:"+$repo,"issue:"+$issue]}')") | ||
| echo "url=$(echo "$resp" | jq -er '.url')" >> "$GITHUB_OUTPUT" | ||
| echo "is_new_session=$(echo "$resp" | jq -r '.is_new_session // true')" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
jq alternative operator converts false to true
Medium Severity
The jq expression .is_new_session // true uses the alternative operator, which replaces both null and false with the right-hand side. When the Devin API returns "is_new_session": false for a duplicate session, this expression incorrectly evaluates to true, causing the workflow to always post a comment — even for already-existing sessions.
Reviewed by Cursor Bugbot for commit 52802c6. Configure here.


Summary
Adds a GitHub Actions workflow that automatically creates a Devin session when the
devinlabel is added to any issue in this repo.How it works
devinlabel to any GitHub issuePrerequisites
DEVIN_API_KEYorganization secret must be configured in GitHub (Settings → Secrets → Actions → Organization secrets)Note
Medium Risk
Adds a new GitHub Actions workflow that triggers on issue label events, calls an external API using
DEVIN_API_KEY, and posts issue comments; misconfiguration or secret/permissions issues could impact repo automation behavior.Overview
Automatically spins up a Devin session when an issue is labeled
devinvia a new.github/workflows/devin-on-label.ymlworkflow.The workflow builds a prompt from the labeled issue’s URL/title/body, creates an idempotent session through
https://api.devin.ai/v1/sessions, and (only for newly created sessions) comments the session link back on the issue usingissues: writepermissions.Reviewed by Cursor Bugbot for commit 52802c6. Bugbot is set up for automated code reviews on this repo. Configure here.