go-audit icon indicating copy to clipboard operation
go-audit copied to clipboard

Add ability to skip applying rules

Open davidhuie-dd opened this issue 5 years ago • 4 comments

  • [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [x] I've read and agree to the Code of Conduct.
  • [x] I've been mindful about doing atomic commits, adding documentation to my changes, not refactoring too much.
  • [x] I've a descriptive title and added any useful information for the reviewer. Where appropriate, I've attached a screenshot and/or screencast (gif preferrably).
  • [x] I've written tests to cover the new code and functionality included in this PR.
  • [x] I've read, agree to, and signed the Contributor License Agreement (CLA).

PR Summary

This introduces a skip_rules configuration setting which prevents go-audit from setting rules itself. This enables audit rules to be set by an external system, utilizing go-audit exclusively for logging.

davidhuie-dd avatar Apr 02 '19 18:04 davidhuie-dd

Codecov Report

Merging #61 into master will decrease coverage by 0.1%. The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #61      +/-   ##
=========================================
- Coverage   75.21%   75.1%   -0.11%     
=========================================
  Files           5       5              
  Lines         476     478       +2     
=========================================
+ Hits          358     359       +1     
- Misses        101     102       +1     
  Partials       17      17
Impacted Files Coverage Δ
audit.go 74.68% <25%> (-0.21%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update daf7385...ad94b32. Read the comment docs.

codecov-io avatar Apr 02 '19 18:04 codecov-io

Is anyone checking these?

davidhuie-dd avatar May 10 '19 21:05 davidhuie-dd

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 30 '19 05:07 CLAassistant

:wave: @davidhuie-dd thanks for the PR! This looks like a good idea to me but I'd like to modify it a bit. rules.skip seems more natural, can you also update the example config with a little comment about the additional option?

nbrownus avatar Oct 11 '19 04:10 nbrownus