Repository navigation
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Parent: safedep/control-tower#573
Raised from the review of #30.
Problem
safedep project scan create <project-name> can scan only an existing SafeDep project with an active GitHub repository binding. The CLI currently offers no project-domain workflow to establish that prerequisite. A user who knows a repository name but has not linked or materialized it must leave the CLI and discover the GitHub App setup flow elsewhere.
Goal
Provide a CLI workflow, proposed as:
safedep project sync --githubThe workflow should use the IntegrationService operations owned by safedep/control-tower#573 to guide the user from tenant GitHub-link status to canonical SafeDep projects that are ready for safedep project scan create.
Required behavior
- Read GitHub App installation links for the active tenant.
- When no usable tenant link exists, return an actionable GitHub installation/link URL and create no project state.
- When a usable link exists, select repositories through immutable GitHub repository IDs and call the appropriate project-materialization API.
- Keep GitHub credentials and authoritative repository metadata inside Control Tower.
- Return the materialized SafeDep project names and IDs so the user can submit a Project Scan.
- Use the CLI's structured useful-error presentation for stale, removed, suspended, conflicting, or unauthorized installations.
- Document the workflow and cover link-state, selection, materialization, and partial-failure behavior with tests.
Open UX decisions
- Whether
project sync --githubis the final command shape or whether a more explicit nested noun better matches the command conventions. - Whether repository selection is interactive, flag-driven, or supports both.
- Whether the command handles one repository per invocation or a bounded batch.
Non-goals
- Starting a Project Scan automatically. Scan submission remains
safedep project scan create. - Adding GitHub credentials or direct GitHub API calls to the CLI.
- Reimplementing linking or project materialization outside Control Tower.
- Background full-installation repository inventory.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
arunanshub commentedon Nov 10, 2026
Done by #35 (GitHub) and #63 (Bitbucket):
safedep project sync [OWNER/REPOSITORY...]creates one SafeDep project per selected repository, ready forsafedep project scan create.The open UX decisions were settled as:
safedep project sync, with--source github|bitbucketinferred from the tenant's links when omitted.--repository-id/--repository-uuid. No interactive mode.One part is not done: when the tenant has no GitHub link, the error tells the user to install and link the SafeDep GitHub App but gives no URL.
Scanning a branch or tag from the CLI is tracked in #73.