Skip to content

Commit fc14faa

Browse files
authored
Add a demo and update docs (#77)
1 parent 1e5e1f4 commit fc14faa

File tree

19 files changed

+434
-81
lines changed

19 files changed

+434
-81
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repos:
77
files: "^(compliance|test)"
88
stages: [commit]
99
- repo: https://gitlab.com/pycqa/flake8
10-
rev: 3.8.3
10+
rev: 3.8.4
1111
hooks:
1212
- id: flake8
1313
args: [

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# [1.6.4](https://github.com/ComplianceAsCode/auditree-framework/releases/tag/v1.6.4)
2+
3+
- [ADDED] Demo set of fetchers and checks added.
4+
- [ADDED] "Try It" section added to the README.
5+
- [CHANGED] Quick Start guide updated to include references to demo fetchers and checks implementation.
6+
17
# [1.6.3](https://github.com/ComplianceAsCode/auditree-framework/releases/tag/v1.6.3)
28

39
- [ADDED] Fetcher and check execution times are now included in execution logging.

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,38 @@ This will update the files in `doc` with the latest documentation. These files s
9595

9696
## Try it
9797

98-
Coming soon...
98+
Successfully complete the steps below and you should be able to find your local
99+
evidence locker in your `$TMPDIR/compliance` folder. There you will find a `raw`
100+
folder that contains all of the raw evidence fetched by the fetchers found in the
101+
`demo/demo_examples/fetchers` folder along with a `reports` folder that contains
102+
the reports generated by the checks found in the `demo/demo_examples/checks` folder.
103+
104+
- Create an empty [credentials][] file:
105+
106+
```shell
107+
$ touch ~/.credentials
108+
```
109+
110+
- Set up your environment:
111+
112+
```shell
113+
cd demo
114+
python -m venv
115+
. ./venv/bin/activate
116+
pip install -r requirements.txt
117+
```
118+
119+
- Run the fetchers:
120+
121+
```shell
122+
compliance --fetch --evidence local -C auditree_demo.json -v
123+
```
124+
125+
- Run the checks:
126+
127+
```shell
128+
compliance --check demo.arboretum.accred,demo.custom.accred --evidence local -C auditree_demo.json -v
129+
```
99130

100131
## Contribute
101132

@@ -124,3 +155,4 @@ We have a tool called [Plant](https://github.com/ComplianceAsCode/auditree-plant
124155
[yapf]: https://github.com/google/yapf
125156
[lint-test]: https://github.com/ComplianceAsCode/auditree-framework/actions?query=workflow%3A%22format+%7C+lint+%7C+test%22
126157
[pypi-upload]: https://github.com/ComplianceAsCode/auditree-framework/actions?query=workflow%3A%22PyPI+upload%22
158+
[credentials]: https://complianceascode.github.io/auditree-framework/design-principles.html#credentials

compliance/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# limitations under the License.
1515
"""Compliance automation package."""
1616

17-
__version__ = '1.6.3'
17+
__version__ = '1.6.4'

demo/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Execution Configuration Example

demo/auditree_demo.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"locker": {
3+
"url": "https://github.com/MY_ORG/MY_EVIDENCE_REPO"
4+
},
5+
"notify": {
6+
"slack": {
7+
"demo.arboretum.accred": ["#some-slack-channel", "#some-other-slack-channel"],
8+
"demo.custom.accred": ["#some-slack-channel"]
9+
},
10+
"gh_issues": {
11+
"demo.arboretum.accred": {
12+
"repo": ["MY_ORG/MY_GH_ISSUES_REPO", "MY_ORG/MY_OTHER_GH_ISSUES_REPO"],
13+
"title": "Check results for demo.arboretum.accred accreditation"
14+
}
15+
}
16+
}
17+
}

demo/controls.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"arboretum.auditree.checks.test_python_packages.PythonPackageCheck": ["demo.arboretum.accred"],
3+
"demo_examples.checks.test_world_clock.WorldClockCheck": ["demo.custom.accred"]
4+
}

demo/demo_examples/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# -*- mode:python; coding:utf-8 -*-
2+
# Copyright (c) 2020 IBM Corp. All rights reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# -*- mode:python; coding:utf-8 -*-
2+
# Copyright (c) 2020 IBM Corp. All rights reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- mode:python; coding:utf-8 -*-
2+
# Copyright (c) 2020 IBM Corp. All rights reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
from arboretum.auditree.checks.test_python_packages import PythonPackageCheck

0 commit comments

Comments
 (0)