Crate ghastoolkit

source ·
Expand description

GitHub Advanced Security (GHAS) Toolkit is a library for interacting with various GitHub’s API and features. The main goal of this library is to provide a simple and easy to use interface with these features.

§Features

There are a few features that are currently supported by this library:

  • CodeQL
    • CodeQL CLI
    • CodeQL Database(s)
  • GitHub Advanced Security APIs
    • Code Scanning
    • Secret Scanning

§Usage

use ghastoolkit::{GitHub, Repository};

#[tokio::main]
async fn main() {
    // Initialize GitHub using default environment variables or github.com
    let github = GitHub::default();
    println!("GitHub :: {}", github);

    let repository = Repository::parse("geekmasher/ghastoolkit-rs@main")
        .expect("Failed to create Repository");
    println!("Repository :: {}", repository);
}

Re-exports§

Modules§

  • CodeQL module is used to interact with CodeQL CLI and databases
  • Code Scanning module is used to interact with GitHub’s Code Scanning API
  • GHASToolkit errors module contains all the errors that can be thrown by the library
  • GitHub Octokit client for interacting with GitHub’s API endpoints Octokit is a GitHub API client for Rust.
  • GHASToolkit supplychain module contains all the supplychain related functions and helpers
  • GHASToolkit utils module contains all the utility functions and helpers