Skip to content

fix(authz): close list-endpoint scope bypass - #6662

Merged
kodiakhq[bot] merged 1 commit into
v2from
rd/v2/authz-list-env-ns-allowed
Oct 15, 2026
Merged

kodiakhq[bot] merged 1 commit into
v2from
rd/v2/authz-list-env-ns-allowed

Conversation

@erka

@erka erka commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

ListNamespaces now denies environments hidden by viewable_environments.
Undefined list scopes fall back to the allow decision instead of an unrestricted list.

@erka
erka requested a review from a team as a code owner October 12, 2026 13:56
@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.74%. Comparing base (3b4a2a4) to head (d9be13f).
⚠️ Report is 1 commits behind head on v2.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2    #6662      +/-   ##
==========================================
+ Coverage   70.69%   70.74%   +0.04%     
==========================================
  Files         152      152              
  Lines       14218    14234      +16     
==========================================
+ Hits        10052    10070      +18     
+ Misses       4166     4164       -2     
Flag Coverage Δ
integrationtests 36.55% <0.00%> (-0.05%) ⬇️
unittests 63.27% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: approve

The fix correctly closes the authorization bypass: undefined viewable_environments and viewable_namespaces scopes now require an explicit allowed decision before defaulting to unrestricted (["*"]), and ListNamespaces additionally verifies the requested environment is viewable. The logic is sound, tests cover edge cases well (including nil environment, query failures, and hidden-environment denials), and error handling follows existing patterns. No issues found.

🤖 Automated review by the Flipt PR review agent.

ListNamespaces now denies environments hidden by viewable_environments.
Undefined list scopes fall back to the allow decision instead of an unrestricted list.

Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>
@erka
erka force-pushed the rd/v2/authz-list-env-ns-allowed branch from 57591ad to d9be13f Compare October 15, 2026 13:08

@markphelps markphelps left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thank you!!

@erka erka added the automerge Used by Kodiak bot to automerge PRs label Oct 15, 2026
@kodiakhq
kodiakhq Bot merged commit 7f1a8d8 into v2 Oct 15, 2026
40 checks passed
@kodiakhq
kodiakhq Bot deleted the rd/v2/authz-list-env-ns-allowed branch October 15, 2026 14:22
@github-project-automation github-project-automation Bot moved this to Done in Flipt V2 Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Used by Kodiak bot to automerge PRs v2 Flipt v2

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

authz: list endpoints skip allow and don't check namespace scope against environment scope

2 participants