-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add new rule: TeamCity API Token * Fix `rules check` bug that allowed empty capture groups to go undetected
- Loading branch information
1 parent
882f6b4
commit 46852e0
Showing
10 changed files
with
64 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
crates/noseyparker/data/default/builtin/rules/teamcity.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
rules: | ||
|
||
- name: TeamCity API Token | ||
|
||
id: np.teamcity.1 | ||
|
||
# This is a JWT-like format that always seems to have the same `{"typ": "TCV2"}` header. | ||
# Note that the payload part does not decode as a JSON object, and hence makes this an invalid JWT. | ||
pattern: | | ||
(?x) | ||
\b ( | ||
eyJ0eXAiOiAiVENWMiJ9 (?# decodes to `{"typ": "TCV2"}` ) | ||
\. | ||
[A-Za-z0-9_-]{36} | ||
\. | ||
[A-Za-z0-9_-]{48} | ||
) (?: [^A-Za-z0-9_-] | $ ) | ||
examples: | ||
- '<add key="ClearTextPassword" value="eyJ0eXAiOiAiVENWMiJ9.RkNWLXdXS3M1RVBfencxM4A0WmJzdVlCQzFj.OGY1OWRkNGMtYTUxYS04ZDYwLWFiZGYtZWE5MWFhZWJiODhh" />' | ||
|
||
references: | ||
- https://www.jetbrains.com/help/teamcity/rest/teamcity-rest-api-documentation.html | ||
|
||
description: > | ||
A TeamCity REST API token was found. | ||
TeamCity is a CI/CD platform from JetBrains. | ||
An attacker may be able to use this token to access source code, secrets, and build resources, enabling a supply chain attack. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters