Repository navigation
Description
Problem Description
A Popeye scan with no namespace does not scan every namespace. The adapter and its documents say that it does.
build_popeye_cmd(src/devops_cli/config/commands.py) andPopeyeScanner.build_command(src/devops_cli/security/popeye.py) say "overnamespace, or every namespace".- The spec
agent-scan-toolssaid "over every namespace when the agent names none", and the testtest_popeye_scans_the_whole_cluster_when_it_gets_no_namespaceintests/test_secops.pyhas the same name. - The command is
popeye -o json -l warn, with no-A. Popeye 0.22.1 then scans only the namespace of the current context.
Reproduction Steps
- Set a namespace on the current context:
kubectl config set-context --current --namespace=<namespace>. - Run
popeye -o json -l warnand count the resources in the report. - Run
popeye -o json -l warn -Aand count again.
Expected vs Actual Behavior
Expected: the scope of a scan with no namespace and the words of the code, the spec and the tests agree. A person decides the scope: every namespace (-A), or the namespace of the context.
Actual: on a test cluster, the scan with no -n read 3 config maps of the namespace of the context, and the scan with -A read 58. With no namespace on the context, Popeye scanned only default.
Environment Diagnostics
Popeye 0.22.1, kubectl v1.37.1, devops-cli at origin/main 86d5bce.
Logs, Traces, or Terminal Output
None. The counts above come from the JSON report of each run.
Pre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate.
Source: #2132
Proposed design
Problem statement
A Popeye scan with no namespace should cover every namespace, as the code docstrings, the spec, and the test name all state. But the command omits the -A flag, so Popeye 0.22.1 scans only the namespace of the current context. Security findings in other namespaces go undetected.
Acceptance criteria
- Criterion 1: build_popeye_cmd includes
-Ain the command when namespace is None.
Verification: Runuv run devops ci test tests/test_secops.pyand confirmtest_popeye_scans_the_whole_cluster_when_it_gets_no_namespacepasses. - Criterion 2: build_popeye_cmd includes
-nand no-Awhen namespace is provided.
Verification: Runuv run devops ci test tests/test_secops.pyand confirmtest_popeye_reports_each_issue_of_its_report_at_warn_levelpasses. - Criterion 3: The test
test_popeye_scans_the_whole_cluster_when_it_gets_no_namespaceasserts the expected command contains-A.
Verification: Inspecttests/test_secops.pyand confirm the expected command list includes-A.
Key questions
- Does
-Aconflict with the--contextflag?: No.--contextselects the cluster context.-Aselects all namespaces within that cluster. They are orthogonal. [sources: src/devops_cli/config/commands.py] - What is the intended scope when no namespace is given?: Every namespace. The docstrings in build_popeye_cmd and PopeyeScanner.build_command both state the scan covers every namespace when none is named. [sources: src/devops_cli/config/commands.py, src/devops_cli/security/popeye.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady
Activity
dan-petty commentedon Oct 28, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The Popeye adapter omits the -A flag, so the scan covers fewer namespaces than the code, spec, and tests all state it should.Security scans silently skip namespaces, so vulnerabilities in other namespaces go undetected.Users rely on the scan to cover every namespace, and the current gap can hide real findings.The fix adds the -A flag to the existing popeye command in two files and updates the test assertion.Both concern security scanner adapters not working as intended, but #2214 fixes missing tool installation while this fixes a missing -A flag in the Popeye command.dan-petty commentedon Oct 28, 2026
Status set to Ready at 73d1807 (see proposed design in issue body).
fix(security): scan all namespaces with Popeye when no namespace is g…