Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TrueNAS API Key rule #110

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

- Docker Hub Personal Access Token ([#108](https://github.com/praetorian-inc/noseyparker/pull/108) - thank you @gemesa!)
- Dropbox Access Token ([#106](https://github.com/praetorian-inc/noseyparker/pull/106) - thank you @gemesa!)
- TrueNAS API Key
- WireGuard Private Key ([#104](https://github.com/praetorian-inc/noseyparker/pull/104) - thank you @gemesa!)
- WireGuard Preshared Key ([#104](https://github.com/praetorian-inc/noseyparker/pull/104) - thank you @gemesa!)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Nosey Parker is a command-line tool that finds secrets and sensitive information

**Key features:**
- It supports scanning files, directories, and the entire history of Git repositories
- It uses regular expression matching with a set of 118 patterns chosen for high signal-to-noise based on experience and feedback from offensive security engagements
- It uses regular expression matching with a set of 119 patterns chosen for high signal-to-noise based on experience and feedback from offensive security engagements
- It groups matches together that share the same secret, further emphasizing signal over noise
- It is fast: it can scan at hundreds of megabytes per second on a single core, and is able to scan 100GB of Linux kernel source history in less than 2 minutes on an older MacBook Pro

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
source: crates/noseyparker-cli/tests/rules/mod.rs
expression: stdout
---
118 rules and 3 rulesets: no issues detected
119 rules and 3 rulesets: no issues detected

Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ expression: stdout
"id": "np.telegram.1",
"name": "Telegram Bot Token"
},
{
"id": "np.truenas.1",
"name": "TrueNAS API Key"
},
{
"id": "np.twilio.1",
"name": "Twilio API Key"
Expand All @@ -481,7 +485,7 @@ expression: stdout
{
"id": "default",
"name": "Nosey Parker default rules",
"num_rules": 98
"num_rules": 99
},
{
"id": "np.assets",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ expression: stdout
np.stripe.1 Stripe API Key
np.stripe.2 Stripe API Test Key
np.telegram.1 Telegram Bot Token
np.truenas.1 TrueNAS API Key
np.twilio.1 Twilio API Key
np.twitter.1 Twitter Client ID
np.twitter.2 Twitter Secret Key
Expand All @@ -126,7 +127,7 @@ expression: stdout

Ruleset ID Ruleset Name Rules
─────────────────────────────────────────────────────────
default Nosey Parker default rules 98
default Nosey Parker default rules 99
np.assets Nosey Parker asset detection rules 15
np.hashes Nosey Parker password hash rules 5

21 changes: 21 additions & 0 deletions crates/noseyparker/data/default/builtin/rules/truenas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
rules:

- name: TrueNAS API Key
id: np.truenas.1

pattern: |
(?x)
\b
(\d+-[a-zA-Z0-9]{64})
\b
gemesa marked this conversation as resolved.
Show resolved Hide resolved

examples:
- '{"id":"3286a508-a6ca-278a-c078-85b2b515d8d2", "msg":"method", "method":"auth.login_with_api_key", "params":["8-Lp22ov7halMBLUpG97Wg4y7fibQi3CW19VJiZcCu746zgCs0mdDdTCoOcpgEucgu"]}'
- '{"id":"677d9914-f598-f497-e77e-2a3aadbb822e", "msg":"method", "method":"auth.login_with_api_key", "params":["9-hTSZDBPyg0PjRZvWb8omoxJ7X2gAjRGmiPKql9ENGIUP9OPtEAzz5f6g9YIMVbZT"]}'
- '{"id":"2755dad4-cc12-94bb-a894-ba0f85c3fdbf", "msg":"method", "method":"auth.login_with_api_key", "params":["10-6LZBVhNq8zze0rzXJptfSWDBoskWuThnQb3fUVw4sVNgJ7GKT3ITVIovhwPf34oL"]}'

gemesa marked this conversation as resolved.
Show resolved Hide resolved
references:
- https://www.truenas.com/docs/api/core_websocket_api.html
- https://www.truenas.com/docs/scale/scaletutorials/toptoolbar/managingapikeys/
- https://www.truenas.com/docs/scale/scaleclireference/auth/cliapikey/
- https://www.truenas.com/docs/scale/api/
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ rulesets:
- np.stripe.1 # Stripe API Key
- np.stripe.2 # Stripe API Test Key
- np.telegram.1 # Telegram Bot Token
- np.truenas.1 # TrueNAS API Key
- np.twilio.1 # Twilio API Key
- np.twitter.2 # Twitter Secret Key
- np.wireguard.1 # WireGuard Private Key
Expand Down