For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex CloudApplication Security

Unrotated access keys detected

Rule Details

Cortex AppSec Rule ID

APPSEC_CICD_8

Category

IAM

Severity

LOW

Impact

Access keys associated with projects have not been rotated for more than 180 days. An attacker who obtains such a key gains direct access to the repository, and if the key has write permissions, can modify the repository content. The longer a key remains active, the higher the risk that a leaked or compromised key could be used maliciously.

To minimize the risk of a stolen access key being used by an attacker, it is recommended to rotate access keys within a maximum period of 180 days after creating the key. To achieve this, for each access key:

  1. Create a new private key on the server intended to use it.

  2. Create a new access key using the matching public key in the same project that the current key was created on.

  3. Direct the server to use the new key instead of the key in use.

  4. Delete the older access key from the Bitbucket project.

There are two options for creating and deploying keys:

  • Create and delete access keys using the console: Browse to the Access Keys tab under the repository settings.

  • Create and delete deploy keys using the API. Refer to the Bitbucket API documentation: https://docs.gitlab.com/ee/api/deploy_keys.html.

Last updated

Was this helpful?