Data and Security
In this section, we’ll cover the architecture of GitLab Detective and share guidance on how to securely use GitLab Detective.
Data collection
GitLab Detective does not collect data from your instances besides their hostname. It performs read operations to the filesystem and database to determine the outcome of checks. To that effect, any data that is being read is reduced to an exit code for the check command. The final reports that GitLab Detective generates are based on these exit codes, but it does not collect those. All data in the final reports is solely based on the check definitions – no data from your instances is included except for the hostnames.
The data generated by GitLab Detective is stored in the same directory as the detective binary. It can be inspected by administrators, and can be shared with GitLab via the Support Portal.
Securely using GitLab Detective
sudo permissions
While you are encouraged to use a non-root user on the GitLab nodes for running Detective, that user will need to have sudo permissions. The ability to use sudo is necessary to access the configuration and log files that GitLab Detective inspects. GitLab Detective only performs read-only operations. Read through the checks directory and the playbook generator source code to get a better understanding of what it will do.
Review the Report
If you’re using GitLab Detective as part of a GitLab Support ticket, please review the contents of the report before sharing it with the GitLab Support team.
SSH Key Management
When installing and deciding how you’ll run GitLab Detective, you’ll need to choose or generate an SSH key pair. While you should adhere to your organization’s security practices, we offer these suggestions on how to securely use GitLab Detective:
- You should generate an SSH key pair to be used exclusively for GitLab Detective
- Use passphrase-protected private keys
- Limit the lifetime of the SSH keypair