Skip to content

Commit

Permalink
fix: scan public Confluence without credentials (#139)
Browse files Browse the repository at this point in the history
Close #137
  • Loading branch information
Baruch Odem (Rothkoff) committed Jul 16, 2023
1 parent 92fabdc commit 822f093
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ docker run -v /home/user/workspace/git-repo:/repo checkmarx/2ms git /repo
We've built `2ms` command line interface to be as self-descriptive as possible. This is the help message that you will see if you executed `2ms` without args:

<!-- command-line:start -->

```
2ms Secrets Detection: A tool to detect secrets in public websites and communication services.
Expand All @@ -79,19 +78,19 @@ Additional Commands:
rules List all rules
Flags:
--config string config file path
--exclude-rule strings exclude rules by name or tag to apply to the scan (removes from list, starts from all)
-h, --help help for 2ms
--include-rule strings include rules by name or tag to apply to the scan (adds to list, starts from empty)
--log-level string log level (trace, debug, info, warn, error, fatal) (default "info")
--regex stringArray custom regexes to apply to the scan, must be valid Go regex
--report-path strings path to generate report files. The output format will be determined by the file extension (.json, .yaml, .sarif)
--stdout-format string stdout output format, available formats are: json, yaml, sarif (default "yaml")
-v, --version version for 2ms
--config string config file path
--exclude-rule strings exclude rules by name or tag to apply to the scan (removes from list, starts from all)
-h, --help help for 2ms
--ignore-result strings ignore specific result by id
--include-rule strings include rules by name or tag to apply to the scan (adds to list, starts from empty)
--log-level string log level (trace, debug, info, warn, error, fatal) (default "info")
--regex stringArray custom regexes to apply to the scan, must be valid Go regex
--report-path strings path to generate report files. The output format will be determined by the file extension (.json, .yaml, .sarif)
--stdout-format string stdout output format, available formats are: json, yaml, sarif (default "yaml")
-v, --version version for 2ms
Use "2ms [command] --help" for more information about a command.
```

<!-- command-line:end -->

## Plugins
Expand Down
3 changes: 3 additions & 0 deletions plugins/confluence.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ func (p *ConfluencePlugin) GetCredentials() (string, string) {
}

func (p *ConfluencePlugin) GetAuthorizationHeader() string {
if p.Username == "" || p.Token == "" {
return ""
}
return lib.CreateBasicAuthCredentials(p)
}

Expand Down

0 comments on commit 822f093

Please sign in to comment.