How scans are matched to projects
Semgrep AppSec Platform decides which project a scan belongs to differently for each scan type:- CI scans and CLI scans are matched by exact project name, including capitalization. The name is the value of
SEMGREP_REPO_DISPLAY_NAMEif it’s set. Otherwise, it’s the repository name that Semgrep detects, or the value ofSEMGREP_REPO_NAME. If no project has that name, Semgrep AppSec Platform creates a new project. The repository’s ID in your SCM isn’t used to match these scans. - Semgrep Managed Scans are linked to a project by the project’s ID, not its name. Renaming the repository in your SCM doesn’t change which project they report to.
- Another project already has the new name.
- Someone renamed the project in Semgrep AppSec Platform, so its name no longer matches the repository name in the SCM.
Rename a project
Rename a project so that scans reported under a new name update the existing project instead of creating a new one.1
In Semgrep AppSec Platform, click Projects.
2
Click the project name to open Project details.
3
In the header, click the icon, then click Rename project.
4
In New name, enter the exact name that your CI scans report, including capitalization, for example
your-org/your-repo. The rename form rejects a name used by another project, including one that differs only in capitalization.5
Click Rename.
Move or rename a repository in your SCM
When you plan to rename a repository or move it to another organization or group in your SCM, rename the Semgrep project to the repository’s new name before the next CI scan runs. This keeps CI scans, Managed Scans, and your findings history in one project.1
Rename or move the repository in your SCM.
2
Before the next CI scan, rename the Semgrep project to the repository’s new name, for example
new-org/your-repo.3
Run a CI scan, or wait for the next one.
4
To confirm the scan landed in the right project, open the project’s Project details page and check that the scan appears on the Scans tab.
SEMGREP_REPO_DISPLAY_NAME in your CI configuration to keep reporting to the old project name.
Fix a duplicate project after a repository move
If a CI scan already created a second project under the repository’s new name, direct future scans to the original project. The original project is the one with your findings history and triage. Existing scans and triage in the duplicate project aren’t transferred. Keep the duplicate if you need to retain that history.1
Open the duplicate project and rename it to a name that no scan uses, for example
new-org/your-repo-duplicate. This frees the new name.2
Open the original project and rename it to the repository’s new name, for example
new-org/your-repo.3
Run a CI scan, or wait for the next one.
4
Open the original project’s Project details page and check that the scan appears on the Scans tab.
5
If you don’t need the duplicate project’s scans or triage, delete the duplicate project.