IBM Project Bob

 View Only

 BOB Shell permissions for executions

Emmanuel Hugonnet's profile image
Emmanuel Hugonnet posted Fri December 19, 2025 04:51 AM

I've asked Bob to review my last commit. I'm getting the following prompt from the shell:

⚒  ?  Shell git show c922ce3414f1d90af29b356e85507357b41768e8 (Get the full diff of the latest commit) ← ─
 

  git show c922ce3414f1d90af29b356e85507357b41768e8

Allow execution of: 'git'?

➤ 1. Yes, allow once
  2. Yes, allow always ...
  3. No, suggest changes (esc)

Here Bob wants to do a "git show " which is something I would like to always authorize but I'm reluctant to authorize every git command as the prompt seems to ask for. Is there a way to specify that ? 

HATIF SAMGITA's profile image
HATIF SAMGITA

Looking at your prompt, it appears that Bob is requesting permission to run a git show command for a specific commit hash. The authorization system, however, is asking you to approve the entire git tool, not just the individual subcommand. That’s why you’re seeing a broader permission request even though the actual operation is read‑only.

The prompt provides three options:

  1. “Yes, allow once” – Approves only this specific execution.
  2. “Yes, allow always…” – Permanently allows all future git commands (any subcommand).
  3. “No, suggest changes” – Rejects the request and lets you modify the command.

At the moment, the authorization prompt does not support built‑in fine‑grained control at the subcommand level (for example, allowing only git show but blocking git push). But you do have a few practical options:


Option 1: Allow Once (Safest)

Choosing “Yes, allow once” approves only the current request.
This is the safest approach because you retain full control—Bob will need approval again the next time he runs any git command.


Option 2: Allow Always for Read‑Only Commands (Use with Caution)

If you’re comfortable allowing non‑destructive, read‑only git operations, you could choose “Yes, allow always.”
Common safe subcommands include:

  • git show
  • git log
  • git diff
  • git status
  • git branch -l

However, approving all git commands also enables potentially destructive operations such as:

  • git push
  • git reset --hard
  • git clean -fd

Because of this, use the “allow always” option carefully.


Option 3: Configure Bob’s Git Permissions

Bob Shell provides configuration options that can define which tools—and in some cases which command patterns—are allowed. You can review and modify the tool‑level settings in your configuration file to restrict how git is used.

For more details, refer to Bob’s documentation:
https://internal.bob.ibm.com/docs/shell/configuring#tools-settings

Mister Alex's profile image
Mister Alex

Yes, don’t allow all git commands globally. Instead, configure your tool’s allowlist (or command permissions) to specifically allow git show only, if supported. Otherwise, you’ll have to approve it per command or adjust the policy file to whitelist safe read-only commands like git show, git diff, etc., rather than all git.