Skip to content

Commit

Permalink
add example for Discord scan
Browse files Browse the repository at this point in the history
  • Loading branch information
Baruch Odem committed Feb 11, 2024
1 parent ad92786 commit a37deaf
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,27 +91,24 @@ jobs:
- In this example we've pinned the version to `2.8.1`. Make sure to check out if there's a newer version
- 💡 Take a look at [2ms GitHub Actions pipeline](https://github.com/Checkmarx/2ms/blob/master/.github/workflows/release.yml) as 2ms scans itself using 2ms.


### Azure DevOps Pipeline

To use 2ms in Azure DevOps Pipeline, create a new pipeline ([see this tutorial](https://learn.microsoft.com/en-us/azure/devops/pipelines/create-first-pipeline) for getting started with Azure DevOps Pipelines). Next, specify in your pipeline `yml` file `azure-pipelines.yml` to run `2ms`:

```yaml
trigger:
- master
- master
pool:
vmImage: ubuntu-latest
steps:
- script: docker run -v $(pwd):/repo checkmarx/2ms:2.8.1 git /repo
displayName: Run 2ms
- script: docker run -v $(pwd):/repo checkmarx/2ms:2.8.1 git /repo
displayName: Run 2ms
```

- In this example we've pinned the version to `2.8.1`. Make sure to check out if there's a newer version


# Command Line Interface

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:
Expand Down Expand Up @@ -248,6 +245,14 @@ Scans [Discord](https://discord.com/) chat application history.
| `--duration` | duration | 14 days | The time interval to scan from the current time. For example, 24h for 24 hours or 336h0m0s for 14 days |
| `--server` | strings | - | Discord servers IDs to scan |
[How to get a Discord token](https://www.geeksforgeeks.org/how-to-get-discord-token/).
Example:
```
2ms discord --token <YOUR_TOKEN> --server 1097814317077897307 --duration 9999h
```
### Slack
Scans [Slack](https://slack.com/) chat application history.
Expand Down Expand Up @@ -295,6 +300,12 @@ Scans a local repository
| `--project-name` | string | - | Project name to differentiate between filesystem scans |
| `--ignore-pattern` | strings | - | Patterns to ignore |
Example:
```
2ms filesystem --path .
```
## Configuration File
You can pass `--config [path to config file]` argument to specify a configuration file. The configuration file format can be in YAML or JSON.
Expand Down

0 comments on commit a37deaf

Please sign in to comment.