Public Repositories Scenario Rule Conditions

This topic describes the conditions that you can use to create rules and the default rules provided for the public repositories scenario.

Public repositories includes the following scenarios:

Each scenario has its own conditions and default rules.

Leaked secrets

Leaked secrets - conditions The following table describes the conditions that you can use to create rules. When using a regular expression, don't surround the expression with quotation marks.

FeaturesOperatorValueDescription
Detection algorithmidentified/did not identifyAn exposed secretDid the Threat Command internal algorithm identify an exposed secret?
Asset namein/not inSelect assetsDoes the found repository contain selected assets from Company name, Brand name, Domain, Public repository queries, or Public repositories?
Asset tagsin/not inSelect tagsAre any of the threat's matched assets tagged with any of the specified tags?
Days since the commit==, !=, >=, <=, >, <User will type # of days since commit was deployedWas the secret committed to a public repository within a defined time frame?
Developer emailis/is not"email address"Was the secret committed to a public repository by a developer with a specific email address?
Developer emailin/not in"Regex list"Was the secret committed to a public repository by a developer whose email address contains a pattern, such as an email domain (can be expressed by regular expression)?
Developer nameis/is not"exact name"Was the secret committed to a public repository by a developer with a specific name?
File contentcontains/does not containSelect assetsDoes the file contain the secret, together with selected assets from Company name, Brand name, Domain, or Public repository queries assets?
File pathis/is not"URL address"Was the secret found in a specific public repository source path?
Matched subdomainin/not inType subdomains to search forDoes the found repository contain specific subdomains?
Proximity (in lines) between the secret and the Company Names asset==, !=, >=, <=, >, <Type a number of linesWas the number of lines of code between the Company Names asset and the secret a specific number?
Proximity (in lines) between the secret and the Domains asset==, !=, >=, <=, >, <Type a number of linesWas the number of lines of code between the Domains asset and the secret a specific number?
Proximity (in lines) between the secret and the Public repository queries asset==, !=, >=, <=, >, <Type a number of linesWas the number of lines of code between the Public repository queries asset and the secret a specific number?
Repository full nameis/is not"exact name"Was the secret found in a public repository whose full name exactly matches?
​Repository full namein/not in"regex list"Was the secret found in a public repository whose full name contains a pattern (can be expressed as a regular expression)?
Repository nameis/is not"exact name"Was the secret found in a public repository whose name exactly matches?
Repository namein/not in"regex list"Was the secret found in a public repository whose name contains a pattern (can be expressed as a regular expression)?
Secret typeis/is notDropdownDoes the secret type (such as API key or AWS key) match a selected type?
Secret valuecontains/does not containDropdownDoes the secret contain selected assets from Company name, Brand name, Domain, or Public repository queries assets?
Secret valuein/not in"regex list"Does the secret value contain a pattern (can be expressed as a regular expression)?
Sourceis/is not"GitHub"Was the secret found in a GitHub public repository?
Sourceis/is not"GitLab"Was the secret found in a GitLab public repository?

Leaked secrets - default rule The following table lists the rules that are provided to get you started quickly.

Rule nameDescription of matchDefault state
Exposed Secret Key - Default Detection RuleA company secret on GitHub or GitLab was detected by the internal Threat Command detection algorithm.Enabled

Matched secrets Alert Profiler examples This example shows one way to use the Alert Profiler.

Problem : Company developers may be uploading company secrets to a public repository on GitHub.

Solution : Create a rule that will alert whenever someone from the company commits a secret to a public repository on GitHub.

temporary placeholder

Customize alert triggering with the Alert profiler :

  1. Add a new rule.
  2. Add the Developer email  condition.
  3. Add the company domain Regex to match commits by company employees.

Asset mentions

The following table describes the conditions that you can use to create rules. When using a regular expression, don't surround the expression with quotation marks. Asset mentions - conditions

FeaturesOperatorValueDescription
Detection algorithmidentified/did not identifyAn exposed exact asset mention(Default) Did the Threat Command internal algorithm identify an exposedexactasset mention?
Detection algorithmidentified/did not identifyAn exposed substring asset mentionDid the Threat Command internal algorithm identify an exposed asset mention, even if not exact?
Asset namein/not inCode mentionsDoes the asset mention contain a matched Code mentions asset?
Asset namein/not inDomainsDoes the asset mention contain a matched Domains asset?
Asset tagsin/not inSelect tagsAre any of the threat's matched assets tagged with any of the specified tags?
Matched Subdomainin/not inSubdomain name listDoes the asset mention contain a company subdomain?
Repository creator descriptioncontains/doesn't containregex listWas the asset mention found in a repository that was created by a user whose description contains a pattern (can be expressed as a regular expression)?
Repository creator nicknamecontains/doesn't containregex listWas the asset mention found in a repository that was created by a user whose nickname contains a pattern (can be expressed as a regular expression)?
Repository descriptioncontains/doesn't containregex listWas the asset mention found in a repository whose description contains a pattern (can be expressed as a regular expression)?
Repository full namecontains/doesn't containregex listWas the asset mention found in a repository whose full name contains a pattern (can be expressed as a regular expression)?
Repository full nameis/is notexact nameWas the asset mention found in a repository whose full name exactly matches a specific name?
Repository namecontains/doesn't containregex listWas the asset mention found in a repository whose name contains a pattern (can be expressed as a regular expression)?
Repository nameis/is notexact nameWas the asset mention found in a repository whose name exactly matches a specific name?

Asset mentions - default rule

The following table lists the rule that is provided to get you started quickly:

Rule nameDescription of matchDefault state
Asset Mention - Default Detection RuleA Code mention asset type was found in a repository:.Disabled

By default, Asset mentions alerts are disabled. When you enable this rule, the alerts are automatically aggregated daily, by file:

  • If multiple assets were found multiple times in the same code file - 1 threat will be created.
  • If a single asset was found multiple times in multiple code files - multiple threats will be created.

You can modify aggregation options as described in Aggregate Alerts.