From 094c74558df329afa6861355640d1374d42486d5 Mon Sep 17 00:00:00 2001 From: rabsondev Date: Mon, 18 Mar 2024 13:43:35 +0000 Subject: [PATCH] Update references to OXO --- README.md | 24 ++++++++++++------------ agent/trufflehog_agent.py | 1 + agent/utils.py | 1 + ostorlab.yaml | 24 ++++++++++++------------ tests/conftest.py | 2 +- tests/input_type_handler_test.py | 1 + tests/trufflehog_test.py | 1 + 7 files changed, 29 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index ea78069..b9b9ecf 100644 --- a/README.md +++ b/README.md @@ -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 @@ -49,10 +49,10 @@ pip3 install ostorlab git clone git@github.com: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. @@ -60,11 +60,11 @@ git clone git@github.com:Ostorlab/agent_trufflehog.git && cd agent_trufflehog 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] ``` diff --git a/agent/trufflehog_agent.py b/agent/trufflehog_agent.py index bad420f..335ef78 100644 --- a/agent/trufflehog_agent.py +++ b/agent/trufflehog_agent.py @@ -1,4 +1,5 @@ """Trufflehog agent.""" + import logging import subprocess import tempfile diff --git a/agent/utils.py b/agent/utils.py index 27e9ff5..b47cf57 100644 --- a/agent/utils.py +++ b/agent/utils.py @@ -1,4 +1,5 @@ """Helper functions for the Trufflehog agent""" + import json from typing import Any diff --git a/ostorlab.yaml b/ostorlab.yaml index 138e962..cbcaba3 100644 --- a/ostorlab.yaml +++ b/ostorlab.yaml @@ -2,27 +2,27 @@ 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 ``` @@ -30,19 +30,19 @@ description: | ```shell git clone git@github.com: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 diff --git a/tests/conftest.py b/tests/conftest.py index 4082a6f..821c395 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,5 @@ """ - conftest for trufflehog agent tests +conftest for trufflehog agent tests """ import pytest diff --git a/tests/input_type_handler_test.py b/tests/input_type_handler_test.py index 5650c48..2c6c91f 100644 --- a/tests/input_type_handler_test.py +++ b/tests/input_type_handler_test.py @@ -1,4 +1,5 @@ """Tests for the input_type_handler Module.""" + import pytest from agent import input_type_handler diff --git a/tests/trufflehog_test.py b/tests/trufflehog_test.py index 1cc9cb6..27f6e17 100644 --- a/tests/trufflehog_test.py +++ b/tests/trufflehog_test.py @@ -1,4 +1,5 @@ """Unittest for truflehog agent.""" + from typing import Dict from ostorlab.agent.message import message