Categorygithub.com/lc/secretz
modulepackage
0.0.0-20200105200840-4d14ecd2a285
Repository: https://github.com/lc/secretz.git
Documentation: pkg.go.dev

# README

secretz

secretz

License Build Status Go ReportCard

secretz is a tool that minimizes the large attack surface of Travis CI. It automatically fetches repos, builds, and logs for any given organization.

Built during and for our research on TravisCI: https://edoverflow.com/2019/ci-knew-there-would-be-bugs-here/

Usage:

secretz -t Organization [options]

Flags:

FlagDescriptionExample
-tOrganization to get repos, builds, and logs forsecretz -t ExampleCo
-cLimit the number of workers that are spawnedsecretz -t ExampleCo -c 3
-delaydelay between requests + random delay/2 jittersecretz -t ExampleCo -delay 900
-members [list | scan]Get all GitHub members belonging to Organization and list/scan themsecretz -t ExampleCo -members scan
-timeoutHow long to wait for HTTP Responses from Travis CIsecretz -t ExampleCo -timeout 20
-setkeySet API Key for api.travis-ci.orgsecretz -setkey yourapikey

Installation:

Via go get

go get -u github.com/lc/secretz

Via git clone

go get -u github.com/json-iterator/go
git clone [email protected]:lc/secretz
cd secretz && go build -o secretz main.go

Generate an API-Key:

travis login
travis token --org

Create config file

secretz -setkey <API-KEY>

Note:

Please keep your delay high and your workers low out of respect for TravisCI and their APIs. This will also help you from being rate-limited by them.

# Packages

No description provided by the author

# Functions

GetBuilds gets all JobId's from builds of a repo.
ParseResponse gets the JSON response from Travis and parses it for repo slugs.
SaveLogs saves build logs for given job ids.

# Variables

GetMembers is a flag with the options: list or scan.

# Structs

Builds is the struct that build information from TravisCI.
Job struct holds a JobID and the Organization name.
TravisCI is the struct that holds repo slugs.