Skip to content

Commit

Permalink
Bump to 2.0.0 (#154)
Browse files Browse the repository at this point in the history
There are breaking changes.
  • Loading branch information
cletomartin authored Feb 14, 2023
1 parent 22e892b commit a7d803e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# [1.25.0](https://github.com/ComplianceAsCode/auditree-framework/releases/tag/v1.25.0)
# [2.0.0](https://github.com/ComplianceAsCode/auditree-framework/releases/tag/v2.0.0)

- [ADDED] Documentation on how to use it with 1Password CLI.
- [CHANGED] "--creds-path" does not default to "~/.credentials".
- [CHANGED] "--creds-path" does not default to "~/.credentials". (BREAKING)
- [FIXED] Number of errors/warnings shown correctly for single checks.

# [1.24.0](https://github.com/ComplianceAsCode/auditree-framework/releases/tag/v1.24.0)
Expand Down
2 changes: 1 addition & 1 deletion compliance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# limitations under the License.
"""Compliance automation package."""

__version__ = "1.25.0"
__version__ = "2.0.0"
5 changes: 2 additions & 3 deletions doc-source/coding-standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ Coding Standards
In this project, we use Python as programming language so please
follow these rules:

* Keep the code tidy using `black
< https://github.com/psf/black>`_ and `flake8
<http://flake8.pycqa.org/en/latest>`_. Don't introduce new
* Keep the code tidy using `black <https://github.com/psf/black>`_
and `flake8 <http://flake8.pycqa.org/en/latest>`_. Don't introduce new
violations and remove them if you spot any. This is enforced by
Github Actions builds. To check your code locally, use::

Expand Down
22 changes: 11 additions & 11 deletions doc-source/design-principles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ accreditations passed to the framework by the CLI.


Fixers
~~~~~~
------

After checks have been run, but before notifications or reports are
generated, the Auditree framework will optionally try to fix the
Expand All @@ -703,7 +703,7 @@ See :ref:`fixers` section for more information.


Report Builder
~~~~~~~~~~~~~~
--------------

Once the execution of all checks and (optionally) fixers have been
executed, the :py:class:`~compliance.report.ReportBuilder` generates
Expand All @@ -715,7 +715,7 @@ See :ref:`report-builder` section for more information.


Notifiers
~~~~~~~~~
---------

After reports have been generated, the tool will collect notification
messages from them and will create a
Expand All @@ -727,7 +727,7 @@ See :ref:`notifiers-description` section for more information.


Execution Config
~~~~~~~~~~~~~~~~
----------------

The Auditree framework is designed to be run locally from your PC or from
a CI server like Jenkins or Travis. The execution can be tweaked at 2
Expand All @@ -748,18 +748,18 @@ levels:


Credentials
~~~~~~~~~~~
-----------

There are 2 ways for providing credentials:

1. *Local file*: if you want to configure your credentials in a local file,
#. *Local file*: if you want to configure your credentials in a local file,
you will have to provide the the framework using ``--creds-path`` option.
This file should be similar to this:

.. include:: credentials-example.cfg
:literal:

1. *Environment variables*: each section and field of the local file can be
#. *Environment variables*: each section and field of the local file can be
rendered as an environment variable.
For instance, suppose your code requires ``creds['github'].token`` or ``creds['slack'].webhook``.
You just need to export:
Expand All @@ -777,17 +777,17 @@ There are 2 ways for providing credentials:
api_key=YYY

Creds with ``.env`` files and 1Password
+++++++++++++++++++++++++++++++++++++++
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Combining the method based on passing env vars to Auditree and `1Password CLI <https://developer.1password.com/docs/cli/>`_,
it is possible to grab the secrets from 1Password and inject them into Auditree.
Here it is how to do it:

1. Create the following alias::
#. Create the following alias::

alias compliance="op run --env-file .env -- compliance"

1. In your fetchers/checks project, create an ``.env`` file with the following schema::
#. In your fetchers/checks project, create an ``.env`` file with the following schema::

<SECTION>_<ATTRIBUTE>="op://<VAULT>/<ITEM>/<FIELD>"

Expand All @@ -797,4 +797,4 @@ Here it is how to do it:
MY_SERVICE_ORG="the-org-id"
MY_SERVICE_API_KEY="op://Shared/my_service/api_key"

1. Now running ``compliance`` will pull credentials from 1Password vaults.
#. Now running ``compliance`` will pull credentials from 1Password vaults.
5 changes: 3 additions & 2 deletions doc-source/quick-start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ evidence locker repository and use ``--evidence no-push`` to pull down a remote
evidence locker only or ``--evidence full-remote`` to pull down and push to a
remote evidence locker. Finally you'll need to configure your credentials file
with the appropriate personal access token for your Git remote hosting service. The
credentials file defaults to ``~/.credentials`` or use the ``--creds-path`` option
to point elsewhere. Valid section headings for Git remote hosting services in your
credentials can be configured in multiple ways. See :ref:`credentials` section.
For this example, we can use the ``--creds-path`` option to point to a credentials file.
Valid section headings for Git remote hosting services in your
credentials are ``github``, ``github_enterprise``, ``bitbucket``, and ``gitlab``.
Using ``github`` as an example, add the following to your credentials file::

Expand Down

0 comments on commit a7d803e

Please sign in to comment.