Conversation
s3inlc
added this pull request to stack #2501
September 17, 2026 12:36
s3inlc
force-pushed
the
886-stack-2-cracker-access-group
branch
2 times, most recently
from
September 22, 2026 12:17
c4f469c to
a32ce4d
Compare
s3inlc
marked this pull request as ready for review
September 22, 2026 12:24
s3inlc
force-pushed
the
886-stack-2-cracker-access-group
branch
4 times, most recently
from
September 23, 2026 09:13
8eca002 to
060e766
Compare
s3inlc
force-pushed
the
886-stack-2-cracker-access-group
branch
from
September 23, 2026 09:43
060e766 to
77b8a43
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical cross-group access-control gaps remain in API expansion and legacy mutation paths, with additional assignment and coverage issues.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 3
Open (3)
What changed in this PR
Adds access-group isolation for cracker binaries across persistence, APIs, task handling, agent downloads, and migrations.
Changes:
- Adds and migrates
accessGroupIdfor cracker binaries. - Enforces user and agent membership across binary and task workflows.
- Updates schemas, setup data, fixtures, and tests.
| File | Reviewed changes | Review notes |
|---|---|---|
src/migrations/postgres/20260917150500_cracker-access-groups.sql |
Adds PostgreSQL access-group migration. | — |
src/migrations/mysql/20260917150500_cracker-access-groups.sql |
Adds MySQL access-group migration. | — |
src/inc/utils/TaskUtils.php |
Restricts task selection by binary group. | Moderate (1 vote): Validate or revoke stale assignments after access changes. Moderate (1 vote): Avoid the non-cached binary lookup N+1 query on the hot path. |
src/inc/utils/SupertaskUtils.php |
Checks binary access during supertask execution. | — |
src/inc/utils/PretaskUtils.php |
Checks binary access during pretask execution. | — |
src/inc/utils/HashlistUtils.php |
Selects accessible binary versions. | — |
src/inc/utils/CrackerUtils.php |
Validates and reassigns binary groups. | — |
src/inc/utils/CrackerBinaryUtils.php |
Filters newest binaries by user groups. | — |
src/inc/utils/AccessUtils.php |
Adds binary access checks. | — |
src/inc/utils/AccessGroupUtils.php |
Reassigns binaries when groups are deleted. | — |
src/inc/user_api/UserAPITask.php |
Passes user context to task operations. | — |
src/inc/user_api/UserAPICracker.php |
Assigns legacy-created binaries to the default group. | Critical (2 votes): Legacy reads and mutations remain accessible across groups. |
src/inc/startup/setup.json |
Adds the default group to initial binaries. | — |
src/inc/handlers/TaskHandler.php |
Validates binary access during UI task creation. | — |
src/inc/handlers/SupertaskHandler.php |
Passes user context to supertask execution. | — |
src/inc/handlers/CrackerHandler.php |
Adds group context to binary creation. | Critical (3 votes): Edit, delete, and type deletion paths lack group validation. |
src/inc/downloadapi/CrackerBinaryDownloadHandler.php |
Checks access before binary downloads. | — |
src/inc/apiv2/openapi/SpecOverrides.php |
Documents the access-group field. | — |
src/inc/apiv2/model/CrackerBinaryAPI.php |
Adds API ACLs and group relationships. | Critical (1 vote): Relationship expansion can bypass binary ACLs. Moderate (1 vote): Add cross-group API coverage, including the count endpoint. |
src/inc/apiv2/helper/CreateSupertaskHelperAPI.php |
Passes user context to supertask creation. | — |
src/inc/agentapi/model/DownloadBinaryAction.php |
Checks agent membership before downloads. | Moderate (1 vote): Health-check assignment or dispatch can still target agents outside the binary group. |
src/dba/models/generator.php |
Adds generated model metadata. | — |
src/dba/models/CrackerBinaryFactory.php |
Loads the access-group field. | — |
src/dba/models/CrackerBinary.php |
Stores and exposes access-group state. | — |
openapi.json |
Updates generated API schemas. | — |
ci/phpunit/TestBase.php |
Updates binary fixtures. | — |
ci/phpunit/inc/UtilTest.php |
Updates initial-object test data. | — |
ci/phpunit/inc/utils/CrackerUtilsTest.php |
Tests group validation and reassignment. | — |
ci/phpunit/inc/utils/CrackerBinaryUtilsTest.php |
Tests group-aware version selection. | — |
ci/phpunit/inc/utils/AccessUtilsTest.php |
Updates agent task-access tests. | — |
ci/phpunit/inc/utils/AccessGroupUtilsTest.php |
Tests reassignment on group deletion. | — |
ci/phpunit/fixtures/openapi/crackerbinarytype.spec.json |
Updates API fixtures. | — |
ci/phpunit/downloadapi/DownloadAppTest.php |
Updates download fixtures and membership. | — |
ci/phpunit/dba/MassUpdateSetTest.php |
Updates binary construction. | — |
ci/phpunit/dba/AbstractModelFactoryTest.php |
Updates binary construction. | — |
ci/apiv2/testfiles/cracker/create_cracker_002.json |
Adds required group data. | — |
ci/apiv2/testfiles/cracker/create_cracker_001.json |
Adds required group data. | — |
ci/apiv2/test_taskwrapper.py |
Updates cracker creation fixtures. | — |
ci/apiv2/test_logentry.py |
Makes log selection resilient to pruning. | — |
ci/apiv2/test_cracker.py |
Updates cracker creation and upload tests. | — |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jessevz
approved these changes
Sep 23, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Adds access-group isolation for cracker binaries. Each binary now belongs to an access group, and API visibility, creation, updates, task selection, agent assignment, and downloads enforce user/agent membership. Existing binaries migrate to the default group, and binaries are reassigned there when a group is deleted.