Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update references to OXO #23

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,37 @@ _TruffleHog is a fast secret scanner._
---


This repository is an implementation of [Ostorlab Agent](https://pypi.org/project/ostorlab/) for the [TruffleHog Scanner](https://github.com/trufflesecurity/trufflehog) by Truffle security.
This repository is an implementation of [OXO Agent](https://pypi.org/project/ostorlab/) for the [TruffleHog Scanner](https://github.com/trufflesecurity/trufflehog) by Truffle security.

## Getting Started
To perform your first scan, simply run the following command:
```shell
ostorlab scan run --install --agent agent/ostorlab/trufflehog file [YOUR_TARGET_FILE]
oxo scan run --install --agent agent/ostorlab/trufflehog file [YOUR_TARGET_FILE]
```

This command will download and install `agent/ostorlab/trufflehog` and scan upir target file for secrets.
For more information, please refer to the [Ostorlab Documentation](https://github.com/Ostorlab/ostorlab/blob/main/README.md)
For more information, please refer to the [OXO Documentation](https://oxo.ostorlab.co/docs)


## Usage

Agent TruffleHog can be installed directly from the ostorlab agent store or built from this repository.
Agent TruffleHog can be installed directly from the oxo agent store or built from this repository.

### Install directly from ostorlab agent store
### Install directly from oxo agent store

```shell
ostorlab agent install agent/ostorlab/trufflehog
oxo agent install agent/ostorlab/trufflehog
```

You can then run the agent with the following command:
```shell
ostorlab scan run --agent agent/ostorlab/trufflehog file [YOUR_TARGET_FILE]
oxo scan run --agent agent/ostorlab/trufflehog file [YOUR_TARGET_FILE]
```


### Build directly from the repository

1. To build the nuclei agent you need to have [ostorlab](https://pypi.org/project/ostorlab/) installed in your machine. if you have already installed ostorlab, you can skip this step.
1. To build the nuclei 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
Expand All @@ -49,22 +49,22 @@ pip3 install ostorlab
git clone [email protected]:Ostorlab/agent_trufflehog.git && cd agent_trufflehog
```

3. Build the agent image using ostorlab cli.
3. Build the agent image using oxo cli.

```shell
ostorlab agent build --file=ostorlab.yaml
oxo agent build --file=ostorlab.yaml
```

You can pass the optional flag `--organization` or `-o` 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
ostorlab scan run --agent agent//trufflehog file [YOUR_TARGET_FILE]
oxo scan run --agent agent//trufflehog file [YOUR_TARGET_FILE]
```
* If you specified an organization when building the image:
```shell
ostorlab scan run --agent agent/[ORGANIZATION]/trufflehog file [YOUR_TARGET_FILE]
oxo scan run --agent agent/[ORGANIZATION]/trufflehog file [YOUR_TARGET_FILE]
```


Expand Down
1 change: 1 addition & 0 deletions agent/trufflehog_agent.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Trufflehog agent."""

import logging
import subprocess
import tempfile
Expand Down
1 change: 1 addition & 0 deletions agent/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helper functions for the Trufflehog agent"""

import json
from typing import Any

Expand Down
24 changes: 12 additions & 12 deletions ostorlab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,47 @@ kind: Agent
name: trufflehog
version: 0.4.0
description: |
This repository is an implementation of [Ostorlab Agent](https://pypi.org/project/ostorlab/) for the [trufflehog tool] https://github.com/trufflesecurity/trufflehog by trufflesecurity.
This repository is an implementation of [OXO Agent](https://pypi.org/project/ostorlab/) for the [trufflehog tool] https://github.com/trufflesecurity/trufflehog by trufflesecurity.

## Getting Started
To perform your first scan, simply run the following command:
```shell
ostorlab scan run --install --agent agent/ostorlab/trufflehog file [YOUR_TARGET_FILE]
oxo scan run --install --agent agent/ostorlab/trufflehog file [YOUR_TARGET_FILE]
```
This command will download and install `agent/ostorlab/trufflehog` and the target file`.
For more information, please refer to the [Ostorlab Documentation](https://github.com/Ostorlab/ostorlab/blob/main/README.md)
For more information, please refer to the [OXO Documentation](https://oxo.ostorlab.co/docs)
## Usage
Agent TruffleHog can be installed directly from the ostorlab agent store or built from this repository.
### Install directly from ostorlab agent store
Agent TruffleHog can be installed directly from the oxo agent store or built from this repository.
### Install directly from oxo agent store
```shell
ostorlab agent install agent/ostorlab/trufflehog
oxo agent install agent/ostorlab/trufflehog
```
You can then run the agent with the following command:
```shell
ostorlab scan run --agent agent/ostorlab/trufflehog file [YOUR_TARGET_FILE]
oxo scan run --agent agent/ostorlab/trufflehog file [YOUR_TARGET_FILE]
```
### Build directly from the repository
1. To build the trufflehog agent you need to have [ostorlab](https://pypi.org/project/ostorlab/) installed in your machine. if you have already installed ostorlab, you can skip this step.
1. To build the trufflehog 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 [email protected]:Ostorlab/agent_trufflehog.git && cd agent_trufflehog
```
3. Build the agent image using ostorlab cli.
3. Build the agent image using oxo cli.
```shell
ostortab agent build --file=ostorlab.yaml
oxo agent build --file=ostorlab.yaml
```
You can pass the optional flag `--organization` or `-o` 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
ostorlab scan run --agent agent//trufflehog file [YOUR_TARGET_FILE]
oxo scan run --agent agent//trufflehog file [YOUR_TARGET_FILE]
```
* If you specified an organization when building the image:
```shell
ostorlab scan run --agent agent/[ORGANIZATION]/trufflehog file [YOUR_TARGET_FILE]
oxo scan run --agent agent/[ORGANIZATION]/trufflehog file [YOUR_TARGET_FILE]
```
in_selectors:
- v3.asset.file
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
conftest for trufflehog agent tests
conftest for trufflehog agent tests
"""

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/input_type_handler_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the input_type_handler Module."""

import pytest

from agent import input_type_handler
Expand Down
1 change: 1 addition & 0 deletions tests/trufflehog_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Unittest for truflehog agent."""

from typing import Dict

from ostorlab.agent.message import message
Expand Down
Loading