Skip to content

Jenkins Shared Library Credentials

Service Name: Jenkins

Service Description: Jenkins is an open-source automation server that enables developers to build, test, and deploy their software reliably. Jenkins Shared Libraries allow teams to share pipeline code across multiple Jenkins pipelines, and these libraries often require credentials to access source control repositories or other services.

Service Address: https://www.jenkins.io/

Validation Type: API Auth

IP Allow list: IP restrictions can be configured at the Jenkins instance level through security settings and proxy configurations.

Secret Access Scope: Grants access to shared pipeline libraries, source code repositories, and potentially other services integrated with Jenkins pipelines.

Secret Revokement URL: https://www.jenkins.io/doc/book/using/using-credentials/

Secret Example: jenkins_shared_lib_token_a1b2c3d4e5f6g7h8i9j0

Suspicious Activity Investigation Instructions:

  • Review Jenkins audit logs for unusual credential usage patterns
  • Check source control system logs for unexpected access using these credentials
  • Examine pipeline execution history for unauthorized or suspicious builds
  • Verify if the credentials were used outside expected Jenkins instances.
  • Review network logs for connections to Jenkins from unexpected IP addresses

Mitigation Instructions:

  • Navigate to Jenkins dashboard and select "Manage Jenkins"
  • Select "Manage Credentials" from the menu
  • Locate the compromised shared library credential
  • Delete the credential or click "Update" to rotate it
  • Generate a new credential with minimal required permissions
  • Update any pipelines or configurations that reference the old credential
  • Consider implementing credential rotation policies
  • Review and restrict which Jenkins jobs can access these credentials