forked from future-architect/vuls
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(config): localize config used like a global variable (future…
…-architect#1179) * refactor(report): LocalFileWriter * refactor -format-json * refacotr: -format-one-email * refactor: -format-csv * refactor: -gzip * refactor: -format-full-text * refactor: -format-one-line-text * refactor: -format-list * refacotr: remove -to-* from config * refactor: IgnoreGitHubDismissed * refactor: GitHub * refactor: IgnoreUnsocred * refactor: diff * refacotr: lang * refacotr: cacheDBPath * refactor: Remove config references * refactor: ScanResults * refacotr: constant pkg * chore: comment * refactor: scanner * refactor: scanner * refactor: serverapi.go * refactor: serverapi * refactor: change pkg structure * refactor: serverapi.go * chore: remove emtpy file * fix(scan): remove -ssh-native-insecure option * fix(scan): remove the deprecated option `keypassword`
- Loading branch information
Showing
91 changed files
with
1,599 additions
and
1,827 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package config | ||
|
||
// AWSConf is aws config | ||
type AWSConf struct { | ||
// AWS profile to use | ||
Profile string `json:"profile"` | ||
|
||
// AWS region to use | ||
Region string `json:"region"` | ||
|
||
// S3 bucket name | ||
S3Bucket string `json:"s3Bucket"` | ||
|
||
// /bucket/path/to/results | ||
S3ResultsDir string `json:"s3ResultsDir"` | ||
|
||
// The Server-side encryption algorithm used when storing the reports in S3 (e.g., AES256, aws:kms). | ||
S3ServerSideEncryption string `json:"s3ServerSideEncryption"` | ||
|
||
Enabled bool `toml:"-" json:"-"` | ||
} | ||
|
||
// Validate configuration | ||
func (c *AWSConf) Validate() (errs []error) { | ||
// TODO | ||
if !c.Enabled { | ||
return | ||
} | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package config | ||
|
||
// AzureConf is azure config | ||
type AzureConf struct { | ||
// Azure account name to use. AZURE_STORAGE_ACCOUNT environment variable is used if not specified | ||
AccountName string `json:"accountName"` | ||
|
||
// Azure account key to use. AZURE_STORAGE_ACCESS_KEY environment variable is used if not specified | ||
AccountKey string `json:"-"` | ||
|
||
// Azure storage container name | ||
ContainerName string `json:"containerName"` | ||
|
||
Enabled bool `toml:"-" json:"-"` | ||
} | ||
|
||
// Validate configuration | ||
func (c *AzureConf) Validate() (errs []error) { | ||
// TODO | ||
if !c.Enabled { | ||
return | ||
} | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.