Skip to content

Commit

Permalink
docs: user feedbacks about documentation (#121)
Browse files Browse the repository at this point in the history
- fix: describing message for wrong instance
- fix: If not giving folder, what will be scanned
- fix: Can I give a Github URL? Or clone the repo?
- docs: go install command installing an old version

Closes #111
  • Loading branch information
Baruch Odem (Rothkoff) authored Jun 28, 2023
1 parent 011c0e5 commit 246e502
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ During the software development lifecycle (SDLC), developers ofen communicate an

## Getting 2ms

```
go install github.com/checkmarx/2ms@latest
```bash
curl -LO https://github.com/Checkmarx/2ms/releases/latest/download/2ms && chmod +x 2ms
./2ms
```

### Docker
Expand Down
6 changes: 3 additions & 3 deletions plugins/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ func (p *GitPlugin) DefineCommand(channels Channels) (*cobra.Command, error) {
p.Channels = channels

command := &cobra.Command{
Use: fmt.Sprintf("%s <PATH>", p.GetName()),
Short: "Scan Git repository",
Long: "Scan Git repository for sensitive information.",
Use: fmt.Sprintf("%s <CLONED_REPO>", p.GetName()),
Short: "Scan local Git repository",
Long: "Scan local Git repository for sensitive information.",
Args: cobra.MatchAll(cobra.ExactArgs(1), validGitRepoArgs),
Run: func(cmd *cobra.Command, args []string) {
log.Info().Msg("Git plugin started")
Expand Down
7 changes: 5 additions & 2 deletions plugins/paligo.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (p *PaligoPlugin) DefineCommand(channels Channels) (*cobra.Command, error)
command.MarkFlagsMutuallyExclusive(paligoUsernameFlag, paligoAuthFlag)
command.MarkFlagsMutuallyExclusive(paligoTokenFlag, paligoAuthFlag)

command.Flags().IntVar(&paligoFolderArg, paligoFolderFlag, 0, "Paligo folder ID")
command.Flags().IntVar(&paligoFolderArg, paligoFolderFlag, 0, "Paligo folder ID. If not specified, the whole instance will be scanned")

return command, nil
}
Expand Down Expand Up @@ -302,8 +302,11 @@ func (p *PaligoClient) listFolders() (*[]EmptyFolder, error) {

var folders *ListFoldersResponse
err = json.Unmarshal(body, &folders)
if err != nil {
return nil, fmt.Errorf("error parsing folders response: %w", err)
}

return &folders.Folders, err
return &folders.Folders, nil
}

func (p *PaligoClient) showFolder(folderId int) (*Folder, error) {
Expand Down

0 comments on commit 246e502

Please sign in to comment.