Skip to main content

Unofficial Administrative Command Line Interface for Contrast Security

Project description

c6t

An unofficial Administrative Command Line Interface (CLI) for Contrast Security.

Table of Contents

Features

  • Login to your Contrast account and save your API credentials to your local machine.
  • Configure your API credentials manually.
  • Download the agent configuration file to your local machine.
  • Integrate with Secure Code Warrior to fetch training exercises and videos for identified vulnerabilities.
  • Download the latest Contrast Security agent from the Maven repository.

Prerequisites

  • Python 3.8 or higher

Installation

$ pip install c6t

Usage

Login

This will prompt you to login to your Contrast account and save your API credentials to your local machine.

$ c6t login

Configure

Alternatively, you can configure your API credentials manually.

$ c6t configure

Get Agent Configuration File

This will download the agent configuration file to your local machine.

$ c6t agent-config

Project Structure

c6t-main/
├── .github/               # GitHub configuration files for CI/CD
│   ├── dependabot.yml
│   └── workflows/
│       └── dump-env.yml
├── src/                   # Source files for the c6t package
│   └── c6t/
│       ├── api/
│       │   ├── agent_config.py
│       │   ├── __init__.py
│       │   └── maven_repo.py
│       ├── configure/
│       │   ├── __init__.py
│       │   └── credentials.py
│       ├── external/
│       │   └── integrations/
│       │       └── scw/
│       │           ├── __init__.py
│       │           ├── contrast_api.py
│       │           └── contrast_scw.py
│       ├── templates/
│       │   ├── contrast_security.yaml.j2
│       │   └── contrast_security_env.yaml.j2
│       ├── ui/
│       │   └── auth.py
│       ├── __init__.py
│       ├── __main__.py
│       └── cli.py
├── tests/                 # Unit tests
│   ├── data/
│   │   ├── checksumfile
│   │   └── testfile
│   ├── __init__.py
│   ├── test_cli.py
│   └── test_maven_repo.py
├── .gitignore
├── .python-version
├── LICENSE
├── README.md
├── pyproject.toml         # Project configuration
├── requirements-dev.lock
└── requirements.lock

Development

Setting Up

  1. Clone the repository:

    $ git clone https://github.com/jharper-sec/c6t
    $ cd c6t
    
  2. Install Rye: Linux/macOS:

    $ curl -sSf https://rye.astral.sh/get | bash
    
  3. Use Rye to install the dependencies:

    $ rye sync
    

Running Tests

To run the tests, use:

$ rye run pytest

Contributing

Contributions are welcome! Please read the contributing guidelines for more details.

License

This project is licensed under the terms of the Apache license. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

c6t-0.1.2.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

c6t-0.1.2-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

Details for the file c6t-0.1.2.tar.gz.

File metadata

  • Download URL: c6t-0.1.2.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for c6t-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c5e7d6932195d46a2987a8963a37716144ff577c550d7403ea98a3f742cfb56e
MD5 4f781faf69eb7b73363fe347ee9e1627
BLAKE2b-256 2dc06de7082cca71ded2f8017e158ed3c7c3fe507be5f5c6a37cdf445edb6aaf

See more details on using hashes here.

File details

Details for the file c6t-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: c6t-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for c6t-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1e5a2b32ceb9b3c1bfde2d6ef894b63d01bdf92f46f6a6b1142cc8fa96432e05
MD5 19cebdda0a99a3e8c9c9d616567288c0
BLAKE2b-256 9151b6f6050b462f0f753f2be0712b6330a2dd1692bdc6f63b9d76551a2eef2a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page