Skip to content

T1593.003 Code Repositories

Adversaries may search public code repositories for information about victims that can be used during targeting. Victims may store code in repositories on various third-party websites such as GitHub, GitLab, SourceForge, and BitBucket. Users typically interact with code repositories through a web application or command-line utilities such as git.

Adversaries may search various public code repositories for various information about a victim. Public code repositories can often be a source of various general information about victims, such as commonly used programming languages and libraries as well as the names of employees. Adversaries may also identify more sensitive data, including accidentally leaked credentials or API keys.1 Information from these sources may reveal opportunities for other forms of reconnaissance (ex: Phishing for Information), establishing operational resources (ex: Compromise Accounts or Compromise Infrastructure), and/or initial access (ex: Valid Accounts or Phishing).

Note: This is distinct from Code Repositories, which focuses on Collection from private and internally hosted code repositories.

Item Value
ID T1593.003
Sub-techniques T1593.001, T1593.002, T1593.003
Tactics TA0043
Platforms PRE
Version 1.0
Created 09 August 2022
Last Modified 26 October 2022

Procedure Examples

ID Name Description
G1004 LAPSUS$ LAPSUS$ has searched public code repositories for exposed credentials.2

Mitigations

ID Mitigation Description
M1013 Application Developer Guidance Application developers uploading to public code repositories should be careful to avoid publishing sensitive information such as credentials and API keys.
M1047 Audit Scan public code repositories for exposed credentials or other sensitive information before making commits. Ensure that any leaked credentials are removed from the commit history, not just the current latest version of the code.

References