Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of global policy config, fix some typos #354

Merged
merged 7 commits into from
Oct 30, 2020

Conversation

acc-jon
Copy link
Contributor

@acc-jon acc-jon commented Oct 16, 2020

No description provided.

@codecov
Copy link

codecov bot commented Oct 16, 2020

Codecov Report

Merging #354 into master will increase coverage by 0.19%.
The diff coverage is 74.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #354      +/-   ##
==========================================
+ Coverage   61.42%   61.62%   +0.19%     
==========================================
  Files          72       73       +1     
  Lines        1602     1639      +37     
==========================================
+ Hits          984     1010      +26     
- Misses        532      539       +7     
- Partials       86       90       +4     
Impacted Files Coverage Δ
pkg/cli/init.go 25.00% <ø> (+5.00%) ⬆️
pkg/cli/register.go 4.00% <0.00%> (-0.55%) ⬇️
pkg/writer/writer.go 40.00% <0.00%> (ø)
pkg/config/global.go 77.50% <70.96%> (-22.50%) ⬇️
pkg/config/configfile.go 100.00% <100.00%> (ø)
pkg/notifications/notifiers.go 84.21% <100.00%> (-2.75%) ⬇️

Copy link
Contributor

@kanchwala-yusuf kanchwala-yusuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @acc-jon,

We already have a config file in terrascan. You can check the sample config file at https://github.com/accurics/terrascan/blob/master/config/terrascan.toml.

We have adopted the toml format for config file, as it is intuitive, easy to use and read.

I see that you expect the Global config file indicated by TERRASCAN_CONFIG to be a json file. This creates two types of config files within terrascan.

Hence, I would request you revise this once again.

@sonarcloud
Copy link

sonarcloud bot commented Oct 28, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

// check if file exists
_, err := os.Stat(configFile)
if err != nil {
zap.S().Errorf("Can't find '%s'", configFile)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small suggestion to not have error strings capitalized: https://github.com/golang/go/wiki/CodeReviewComments#error-strings

@kanchwala-yusuf kanchwala-yusuf merged commit a8084f6 into tenable:master Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants