Skip to content

Commit

Permalink
[remove server] remove the server parts from README, gitignore, setup…
Browse files Browse the repository at this point in the history
….py and requirements-dev
  • Loading branch information
KevinHock committed Apr 2, 2018
1 parent 213250a commit 0998669
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 81 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,5 @@
venv
/tmp


.*ignore
!.gitignore

.pysensu.config.yaml
71 changes: 2 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,75 +73,8 @@ Hooks available:

### Server-side Secret Scanning

There are several steps to setting up your server, to allow for customizability
dependent on the requirements of your existing system.

1. Installing the Server Tool
2. Setting up Default Settings (**optional**)
3. Specifying Tracked Repositories
4. Hooking Up an Alerting System
5. Installing Crontabs

#### 1. Installing the Server Tool

```
$ pip install detect-secrets
```

#### 2. Setting Up Default Settings

The following keys are accepted in your config file:

```
config.yaml
|- default # These are default values to use for each tracked repo.
```

The following attributes are supported under the `default` namespace, and set
default settings for all repositories scanned with the `detect-secrets-server`
tool.

All attributes are **optional**, and can be overriden in `repos.yaml`.

| attribute | description
| -------------- | -----------
| base\_tmp\_dir | Local path used for cloning repositories, and storing tracked metadata.
| baseline | Filename to parse the detect-secrets baseline from.
| exclude\_regex | Files to ignore, when scanning files for secrets.
| plugins | List of plugins, with their respective settings. Currently, these take precedence over values set via command line.

See the sample `config.yaml.sample` for an example.

#### 3. Specifying Tracked Repositories

All tracked repositories need to be defined in `repos.yaml`.
See `repos.yaml.sample` for an example.

The following attributes are supported:

| attribute | description
| --------------- | -----------
| repo | Where to `git clone` the repo from (**required**)
| is\_local\_repo | True or False depending on if the repo is already on the filesystem (**required**)
| sha | The commit hash to start scanning from (**required**)
| baseline | The filename to parse the detect-secrets baseline from
| cron | [crontab syntax](https://crontab.guru/) of how often to run a scan for this repo
| plugins | List of plugins, with their respective settings. This takes precedence over both `config.yaml` settings, and command line arguments.

#### 4. Hooking Up an Alerting System

Currently, we only support [PySensu
alerting](http://pysensu-yelp.readthedocs.io/en/latest/#pysensu_yelp.send_event),
so check out those docs on configuring your Sensu alerts.

See the sample `.pysensu.config.yaml.sample` for an example, but be sure to
name your file `.pysensu.config.yaml`.

#### 5. Installing Crontabs

```
echo -e "$(crontab -l)\n\n$(detect-secrets-server --initialize)" | crontab -
```
Please see the [detect-secrets-server](https://github.com/Yelp/detect-secrets-server)
repository for installation instructions.

### Secrets Baseline

Expand Down
5 changes: 0 additions & 5 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
aspy.yaml==0.3.0
boto3==1.4.7
cached-property==1.3.0
chainmap==1.0.2
coverage==4.4.1
enum34==1.1.6
flake8==3.5.0
future==0.16.0
identify==1.0.5
mccabe==0.6.1
mock==2.0.0
nodeenv==1.2.0
Expand All @@ -15,7 +11,6 @@ pre-commit==0.16.3
py==1.4.34
pycodestyle==2.3.1
pyflakes==1.5.0
pysensu-yelp==0.3.4
pytest==3.2.1
PyYAML==3.12
six==1.10.0
Expand Down
4 changes: 0 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@
author='Aaron Loo',
packages=find_packages(exclude=(['test*', 'tmp*'])),
install_requires=[
'chainmap',
'boto3',
'enum34',
'future',
'pysensu_yelp',
'pyyaml',
'unidiff',
],
entry_points={
'console_scripts': [
'detect-secrets = detect_secrets.main:main',
'detect-secrets-hook = detect_secrets.pre_commit_hook:main',
'detect-secrets-server = detect_secrets.server_main:main',
],
},
version='0.7.0',
Expand Down

0 comments on commit 0998669

Please sign in to comment.