Skip to main content
When a repository is renamed or moved in your source code manager (SCM), scans can start reporting to a new project instead of the existing one. To keep your findings history and triage in one project, read how scans are matched to projects before you rename anything.

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_NAME if it’s set. Otherwise, it’s the repository name that Semgrep detects, or the value of SEMGREP_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.
Separately, Semgrep AppSec Platform syncs projects with your SCM connection, and the sync uses the SCM’s repository ID. When you rename or move a repository in your SCM, the next sync renames the Semgrep project to the repository’s new name. The sync doesn’t rename the project in the following cases:
  • 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.
Because CI scans match by name, a CI scan that runs under the repository’s new name before the next sync creates a second project. The new project starts with no findings history, while the original project keeps your existing findings, triage, and Managed Scans results.

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.
After you rename a project, CI scans that still report the old name create a new project. Make sure the new name matches the name your CI scans report.

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.
You can also set 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.
Deleting the duplicate project deletes its findings, including any triage done in that project. You can’t undo a deletion.
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.