Skip to content

Add bandit skip for B602 (shell=True in password cmd) #11

Description

@f3rdy

Description

password.py uses shell=True in subprocess.run() to execute the configured password command. This is by design (user configures the command in .vaultctl.yml), but bandit flags it as B602 (high severity).

Proposed Solution

Either:

  1. Add B602 to bandit skips in pyproject.toml with a comment explaining why
  2. Or use shlex.split() + shell=False (would break commands with pipes/redirects)

Option 1 is preferred since the command comes from a trusted config file.

Files

  • src/vaultctl/password.py (line 45)
  • pyproject.toml (bandit skips)

Priority

P2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions