Correct background flow enforcement and document a tool rule limit
What does this MR do?
Setting Run Command to Always Deny to block some shell commands also stops the Developer Flow from creating its branch. A tool rule covers a whole tool and cannot match the command a call runs. The page does not say so.
flowchart LR
A["Run Command set to Always Deny"] --> B["Tool removed from the Developer Flow"]
B --> C["No shell, so no glab or Git commands"]
C --> D["Flow ends with no branch and no merge request"]The page says background flows, such as the Developer Flow, are governed if the duo_workflow_background_tool_governance feature flag is on.
Background access applies only to the Developer Flow, and only when it starts in the web or ambient environment.
Other background flows, and a REST start that leaves out environment, read Cloud access even with the flag on.
With the flag off, the default, the Developer Flow reads Cloud access and a rule set only for Background access has no effect on it.
This corrects the page's enforcement sentence and adds the whole-tool point to the Known issues in the tool governance docs.
Evidence
- On a GitLab 19.5.3 Self-Managed test instance, a Developer Flow started through the REST API with Run Command set to Always Deny for Cloud access ran without the
run_commandsprivilege and left no branch. The same flow with no rule had the privilege and created its branch. The flow still started in both cases. - A Run Command rule with
tool_argumentsset to{"command":"git push*"}behaved as the same rule without it, on the same instance. - With the feature flag off and a Run Command rule set to Always Deny only for Background access, the flow kept every privilege and created its branch. A Cloud access rule set to Always Deny removed the privilege with the flag off.
- The shipped Developer Flow toolset has
run_commandand no other shell or Git tool (developer/3.0.0.yml:31-40). Workspace agent templates can add tools. - Resolution indexes rules by tool name (
resolution_service.rb:156-165,:94-95in 19.5.3). - Creating a flow through the REST API or GraphQL intersects its privileges with what the rules allow and does not refuse it (
create_workflow_service.rb:704-716,:630-642in 19.5.3). The refusal check on master is behindduo_workflow_block_start_on_denied_group, off by default (create_workflow_service.rb:734-737), and 19.5.3 has no such check. - With the flag on, a Developer Flow started with
environmentset towebran without therun_commandsprivilege when Run Command was Always Deny for Background access. The same flow started through the REST API with noenvironmentkept the privilege and ran the shell command. - Background access is allowlisted for the
developerflow only (:22,27,:18,23in 19.5.3), and needsenvironmentto beweborambient(:72-80,:38-46in 19.5.3). - The background surface needs the flag (
governance_surface.rb:79,:45in 19.5.3). Only that surface readsbackground_access, and web and ambient readweb_access(tool_rule.rb:65-68,:50-53in 19.5.3). With the flag off, ambient and web starts route toweb_access(create_workflow_service.rb:794-796,:821-822). - The Cloud access label is
web_accessin the UI (ai_tool_rules_table.vue:182-184).
Related issues
- Corrects the background flow enforcement sentence added in !265531 (merged).
Author's checklist
- Optional. Consider taking the GitLab Technical Writing Fundamentals course.
- Follow the:
- If you're adding a new page, add the product availability details under the H1 topic title.
- If you are a GitLab team member, request a review based on:
- The documentation page's metadata.
- The associated Technical Writer.
If you are a GitLab team member and only adding documentation, do not add any of the following labels:
~"frontend"~"backend"~"type::bug"~"database"
These labels cause the MR to be added to code verification QA issues.
Reviewer's checklist
Documentation-related MRs should be reviewed by a Technical Writer for a non-blocking review, based on Documentation Guidelines and the Style Guide.
If you aren't sure which tech writer to ask, use roulette or ask in the #docs Slack channel.
- If the content requires it, ensure the information is reviewed by a subject matter expert.
- Technical writer review items:
- Ensure docs metadata is present and up-to-date.
- Ensure the appropriate labels are added to this MR.
- Ensure a release milestone is set.
- If relevant to this MR, ensure content topic type principles are in use, including:
- The headings should be something you'd do a Google search for. Instead of
Default behavior, say something likeDefault behavior when you close an issue. - The headings (other than the page title) should be active. Instead of
Configuring GDK, say something likeConfigure GDK. - Any task steps should be written as a numbered list.
- If the content still needs to be edited for topic types, you can create a follow-up issue with the docs-technical-debt label.
- The headings should be something you'd do a Google search for. Instead of
- Review by assigned maintainer, who can always request/require the reviews above. Maintainer's review can occur before or after a technical writer review.
An AI coding assistant wrote this change. The assistant also checked each claim against the source files linked above and ran Vale and markdownlint on the changed page. It ran the Developer Flow on a GitLab 19.5.3 Self-Managed test instance with and without each rule described.