Skip to content

Commit 4533b62

Browse files
authored
Merge branch 'main' into orlando-improved-sarif
2 parents 1315b64 + 585e797 commit 4533b62

File tree

11 files changed

+258
-157
lines changed

11 files changed

+258
-157
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ test.py
2222
file_generator.py
2323
.coverage
2424
.env.local
25-
Pipfile
25+
Pipfile
26+
test/
27+
logs

Pipfile.lock

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ socketcli [-h] [--api-token API_TOKEN] [--repo REPO] [--integration {api,github,
1010
[--target-path TARGET_PATH] [--sbom-file SBOM_FILE] [--files FILES] [--default-branch] [--pending-head]
1111
[--generate-license] [--enable-debug] [--enable-json] [--enable-sarif] [--disable-overview] [--disable-security-issue]
1212
[--allow-unverified] [--ignore-commit-files] [--disable-blocking] [--scm SCM] [--timeout TIMEOUT]
13+
[--exclude-license-details]
1314
````
1415

1516
If you don't want to provide the Socket API Token every time then you can use the environment variable `SOCKET_SECURITY_API_KEY`
@@ -58,6 +59,7 @@ If you don't want to provide the Socket API Token every time then you can use th
5859
| --enable-json | False | False | Output in JSON format |
5960
| --enable-sarif | False | False | Enable SARIF output of results instead of table or JSON format|
6061
| --disable-overview | False | False | Disable overview output |
62+
| --exclude-license-details | False | False | Exclude license details from the diff report (boosts performance for large repos) |
6163

6264
#### Security Configuration
6365
| Parameter | Required | Default | Description |

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ dependencies = [
1212
'prettytable',
1313
'GitPython',
1414
'packaging',
15-
'python-dotenv',
16-
'socket-sdk-python>=2.0.5'
15+
'python-dotenv',
16+
'socket-sdk-python>=2.0.8'
1717
]
1818
readme = "README.md"
1919
description = "Socket Security CLI for CI/CD"
@@ -41,6 +41,7 @@ test = [
4141
]
4242
dev = [
4343
"ruff>=0.3.0",
44+
"twine", # for building
4445
"pip-tools>=7.4.0", # for pip-compile
4546
]
4647

socketsecurity/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
__author__ = 'socket.dev'
22
__version__ = '2.0.9'
3+

socketsecurity/config.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class CliConfig:
3333
integration_org_slug: Optional[str] = None
3434
pending_head: bool = False
3535
timeout: Optional[int] = 1200
36+
exclude_license_details: bool = False
3637
@classmethod
3738
def from_args(cls, args_list: Optional[List[str]] = None) -> 'CliConfig':
3839
parser = create_argument_parser()
@@ -71,6 +72,7 @@ def from_args(cls, args_list: Optional[List[str]] = None) -> 'CliConfig':
7172
'integration_type': args.integration,
7273
'pending_head': args.pending_head,
7374
'timeout': args.timeout,
75+
'exclude_license_details': args.exclude_license_details,
7476
}
7577

7678
if args.owner:
@@ -283,6 +285,12 @@ def create_argument_parser() -> argparse.ArgumentParser:
283285
action="store_true",
284286
help=argparse.SUPPRESS
285287
)
288+
output_group.add_argument(
289+
"--exclude-license-details",
290+
dest="exclude_license_details",
291+
action="store_true",
292+
help="Exclude license details from the diff report (boosts performance for large repos)"
293+
)
286294

287295
# Security Configuration
288296
security_group = parser.add_argument_group('Security Configuration')

0 commit comments

Comments
 (0)