File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ The Socket Security CLI was created to enable integrations with other tools like
8
8
socketcli [-h] [--api_token API_TOKEN] [--repo REPO] [--branch BRANCH] [--committer COMMITTER] [--pr_number PR_NUMBER]
9
9
[--commit_message COMMIT_MESSAGE] [--default_branch] [--target_path TARGET_PATH] [--scm {api,github,gitlab}] [--sbom-file SBOM_FILE]
10
10
[--commit-sha COMMIT_SHA] [--generate-license GENERATE_LICENSE] [-v] [--enable-debug] [--enable-json] [--disable-overview]
11
- [--disable-security-issue] [--files FILES]
11
+ [--disable-security-issue] [--files FILES] [--ignore-commit-files]
12
12
````
13
13
14
14
If you don't want to provide the Socket API Token every time then you can use the environment variable ` SOCKET_SECURITY_API_KEY `
@@ -36,3 +36,4 @@ If you don't want to provide the Socket API Token every time then you can use th
36
36
| --disable-overview | | False | False | If enabled will disable Dependency Overview comments |
37
37
| --disable-security-issue | | False | False | If enabled will disable Security Issue Comments |
38
38
| --files | | False | | If provided in the format of ` ["file1", "file2"] ` it will only look for those files and not glob the path |
39
+ | --ignore-commit-files | | False | False | If enabled then the CLI will ignore what files are changed in the commit and look for all manifest files |
Original file line number Diff line number Diff line change 1
1
__author__ = 'socket.dev'
2
- __version__ = '0.0.95 '
2
+ __version__ = '0.0.98 '
Original file line number Diff line number Diff line change 135
135
default = "[]"
136
136
)
137
137
138
+ parser .add_argument (
139
+ '--ignore-commit-files' ,
140
+ help = 'Ignores only looking for changed files form the commit. Will find any supported manifest file type' ,
141
+ action = 'store_true' ,
142
+ default = False
143
+ )
144
+
138
145
139
146
def output_console_comments (diff_report ) -> None :
140
147
console_security_comment = Messages .create_console_security_alert_table (diff_report )
@@ -187,6 +194,7 @@ def main_code():
187
194
enable_json = arguments .enable_json
188
195
disable_overview = arguments .disable_overview
189
196
disable_security_issue = arguments .disable_security_issue
197
+ ignore_commit_files = arguments .ignore_commit_files
190
198
files = arguments .files
191
199
log .info (f"Starting Socket Security Scan version { __version__ } " )
192
200
api_token = os .getenv ("SOCKET_SECURITY_API_KEY" ) or arguments .api_token
@@ -211,7 +219,7 @@ def main_code():
211
219
committer = git_repo .committer
212
220
if commit_message is None or commit_message == '' :
213
221
commit_message = git_repo .commit_message
214
- if len (files ) == 0 :
222
+ if len (files ) == 0 and not ignore_commit_files :
215
223
files = git_repo .changed_files
216
224
except InvalidGitRepositoryError :
217
225
pass
You can’t perform that action at this time.
0 commit comments