-
Notifications
You must be signed in to change notification settings - Fork 23
HYPERFLEET-1186 - fix: align documentation with codebase and fix pageSize default #211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sherine-k
wants to merge
4
commits into
openshift-hyperfleet:main
Choose a base branch
from
sherine-k:HYPERFLEET-1168
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5243d53
HYPERFLEET-1186 - docs: align documentation with codebase
sherine-k d2d1e75
HYPERFLEET-1186 - fix: align pageSize default with TypeSpec contract
sherine-k bdb9bed
HYPERFLEET-1168 - docs: consolidate documentation with v1.0.0 features
sherine-k 83ff866
HYPERFLEET-1168 - docs: streamline docs and take various reviews into…
sherine-k File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: openshift-hyperfleet/hyperfleet-api
Length of output: 4993
🏁 Script executed:
Repository: openshift-hyperfleet/hyperfleet-api
Length of output: 30129
🏁 Script executed:
Repository: openshift-hyperfleet/hyperfleet-api
Length of output: 50392
🏁 Script executed:
Repository: openshift-hyperfleet/hyperfleet-api
Length of output: 22615
🏁 Script executed:
Repository: openshift-hyperfleet/hyperfleet-api
Length of output: 38188
🏁 Script executed:
Repository: openshift-hyperfleet/hyperfleet-api
Length of output: 16418
🏁 Script executed:
Repository: openshift-hyperfleet/hyperfleet-api
Length of output: 7568
Enforce authorization for force-delete endpoints (CWE-285).
POST /api/hyperfleet/v1/clusters/{id}/force-deletehas no caller authorization scoping:pkg/handlers/cluster.goforwards directly topkg/services/cluster.gowhereclusterDao.GetForUpdateselects byid = ?and then hard-deletes cluster + adapter statuses + child nodepools.POST /api/hyperfleet/v1/clusters/{cluster_id}/nodepools/{nodepool_id}/force-deleteonly scopes by path relationship (GetByIDAndOwnerfiltersid = ? AND owner_id = ?withowner_id= cluster_id), not by caller identity/permissions.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're just listing the endpoints in the README.md. I think we can talk about authorization verification in a later section, with a reminder in api-resources for example, pointing to the authentication.md ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sherine-k— Agreed, the endpoint listing section isn't the place for auth docs. A note indocs/api-resources.mdunder the Force Delete sections (cluster + nodepool) pointing todocs/authentication.mdfor access-control requirements is the right structure.That said, the documentation concern is separate from the underlying code issue (CWE-285):
pkg/handlers/cluster.goandpkg/handlers/cluster_nodepools.gocurrently forwardForceDeletecalls straight to the service/DAO layer with no caller-identity authorization check — only path-parameter ownership (id/owner_id) is validated. That's a live security gap independent of what the docs say.Would you like me to open a follow-up GitHub issue to track the missing authorization enforcement in the force-delete handlers?