Skip to content

Commit

Permalink
IP rules removing
Browse files Browse the repository at this point in the history
  • Loading branch information
babenek committed Aug 6, 2024
1 parent 4d89a19 commit 28fc39a
Show file tree
Hide file tree
Showing 11 changed files with 965 additions and 6,674 deletions.
102 changes: 50 additions & 52 deletions cicd/benchmark.txt

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion credsweeper/filters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from credsweeper.filters.value_grafana_check import ValueGrafanaCheck
from credsweeper.filters.value_grafana_service_check import ValueGrafanaServiceCheck
from credsweeper.filters.value_hex_number_check import ValueHexNumberCheck
from credsweeper.filters.value_ip_check import ValueIPCheck
from credsweeper.filters.value_jfrog_token_check import ValueJfrogTokenCheck
from credsweeper.filters.value_json_web_token_check import ValueJsonWebTokenCheck
from credsweeper.filters.value_last_word_check import ValueLastWordCheck
Expand Down
51 changes: 0 additions & 51 deletions credsweeper/filters/value_ip_check.py

This file was deleted.

28 changes: 0 additions & 28 deletions credsweeper/rules/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,34 +126,6 @@
target:
- code

- name: IPv4
severity: info
confidence: weak
type: pattern
values:
- (?<![.0-9a-zA-Z])(?P<value>[0-2]?[0-9]{1,2}\.[0-2]?[0-9]{1,2}\.[0-2]?[0-9]{1,2}\.[0-2]?[0-9]{1,2})(?![.0-9a-zA-Z])
filter_type:
- ValueIPCheck
min_line_len: 10
required_substrings:
- "."
target:
- code

- name: IPv6
severity: info
confidence: strong
type: pattern
values:
- (?<![:0-9A-Za-z])(?P<value>[0-9A-Fa-f]{0,4}:(:?[0-9A-Fa-f]{1,4}:?){0,6}:[0-9A-Fa-f]{1,4})(?![:0-9A-Za-z])
filter_type:
- ValueIPCheck
min_line_len: 10
required_substrings:
- ":"
target:
- code

- name: AWS Client ID
severity: high
confidence: moderate
Expand Down
8 changes: 0 additions & 8 deletions docs/source/credsweeper.filters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,6 @@ credsweeper.filters.value\_grafana\_check module
:undoc-members:
:show-inheritance:

credsweeper.filters.value\_ip\_check module
-------------------------------------------

.. automodule:: credsweeper.filters.value_ip_check
:members:
:undoc-members:
:show-inheritance:

credsweeper.filters.value\_jfrog\_token\_check module
-----------------------------------------------------

Expand Down
12 changes: 6 additions & 6 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
from pathlib import Path

# total number of files in test samples
SAMPLES_FILES_COUNT: int = 131
SAMPLES_FILES_COUNT: int = 129

# the lowest value of ML threshold is used to display possible lowest values
NEGLIGIBLE_ML_THRESHOLD = 0.0001

# credentials count after scan
SAMPLES_CRED_COUNT: int = 430
SAMPLES_CRED_LINE_COUNT: int = 447
SAMPLES_CRED_COUNT: int = 362
SAMPLES_CRED_LINE_COUNT: int = 379

# credentials count after post-processing
SAMPLES_POST_CRED_COUNT: int = 388
SAMPLES_POST_CRED_COUNT: int = 320

# with option --doc
SAMPLES_IN_DOC = 411

# archived credentials that are not found without --depth
SAMPLES_IN_DEEP_1 = SAMPLES_POST_CRED_COUNT + 25
SAMPLES_IN_DEEP_2 = SAMPLES_IN_DEEP_1 + 18
SAMPLES_IN_DEEP_1 = SAMPLES_POST_CRED_COUNT + 24
SAMPLES_IN_DEEP_2 = SAMPLES_IN_DEEP_1 + 17
SAMPLES_IN_DEEP_3 = SAMPLES_IN_DEEP_2 + 1

# well known string with all latin letters
Expand Down
Loading

0 comments on commit 28fc39a

Please sign in to comment.