generated from Ostorlab/template_agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathostorlab.yaml
59 lines (58 loc) · 2.16 KB
/
ostorlab.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
kind: Agent
name: semgrep
version: 1.0.2
description: |
This repository is an implementation of [OXO Agent](https://pypi.org/project/ostorlab/) for [Semgrep](https://github.com/returntocorp/semgrep) by r2c.
## Getting Started
To perform your first scan, simply run the following command:
```shell
oxo scan run --install --agent agent/ostorlab/semgrep file code.c
```
This command will download and install `agent/ostorlab/semgrep` and analyze the file `code.c`.
For more information, please refer to the [OXO Documentation](https://oxo.ostorlab.co/docs)
## Usage
Agent Semgrep can be installed directly from the oxo agent store or built from this repository.
### Install directly from oxo agent store
```shell
oxo agent install agent/ostorlab/semgrep
```
You can then run the agent with the following command:
```shell
oxo scan run --install --agent agent/ostorlab/semgrep file code.c
```
### Build directly from the repository
1. To build the semgrep agent you need to have [oxo](https://pypi.org/project/ostorlab/) installed in your machine. if you have already installed oxo, you can skip this step.
```shell
pip3 install ostorlab
```
2. Clone this repository.
```shell
git clone https://github.com/Ostorlab/agent_semgrep.git && cd agent_semgrep
```
3. Build the agent image using oxo cli.
```shell
oxo agent build --file=ostorlab.yaml
```
You can pass the optional flag `--organization` to specify your organisation. The organization is empty by default.
4. Run the agent using on of the following commands:
* If you did not specify an organization when building the image:
```shell
oxo scan run --agent agent//semgrep file code.c
```
* If you specified an organization when building the image:
```shell
oxo scan run --agent agent/[ORGANIZATION]/semgrep file code.c
```
## License
[Apache-2.0](./LICENSE)
license: Apache-2.0
in_selectors:
- v3.asset.file
out_selectors:
- v3.report.vulnerability
docker_file_path : Dockerfile
docker_build_root : .
args:
- name: "memory_limit"
description: "Memory limit for semgrep to use on a single file."
type: "number"