Documentation ¶
Overview ¶
Copyright 2021 taralizer authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package taralizer Threat and Risk Analyzer Copyright 2021 taralizer authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package taralizer Threat and Risk Analyzer Copyright 2021 taralizer authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package taralizer Threat and Risk Analyzer Copyright 2021 taralizer authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func GetMapIntValue(data map[string]interface{}, key string, location string) int64
- func GetMapStringValue(data map[string]interface{}, key string, location string) string
- type Author
- type CommunicationLink
- type DataAsset
- type Measure
- type ProfileSet
- type Report
- type ReportEngine
- func (svc *ReportEngine) GenerateReport(wr io.Writer, tplFile string, report Report)
- func (svc *ReportEngine) GenerateReportFile(filename string, tplFile string, report Report)
- func (svc *ReportEngine) GenerateReportFilePDF(filename string, tplFileReport string, tplFileCover string, report Report)
- func (svc *ReportEngine) GetTemplateDir() string
- type Risk
- type Rule
- type RuleSet
- type StringWriter
- type Taralizer
- type TechnicalAsset
- type Technology
- type ThreatAgent
- type TrustBoundary
Constants ¶
const PDF_REPORT_COVER_HTML = "pdf_report_cover.html"
const PDF_REPORT_HTML = "pdf_report.html"
const REPORT_FMT_STRING = "%s(%d)"
const RULE_REGO = "rego rule"
const RULSET_YAML = "ruleset.yaml"
Variables ¶
This section is empty.
Functions ¶
func GetMapIntValue ¶
Types ¶
type CommunicationLink ¶
type CommunicationLink struct { Target string `yaml:"target"` Description string `yaml:"description,omitempty"` Protocol string `yaml:"protocol,omitempty"` Authenication string `yaml:"authenication,omitempty"` Authorization string `yaml:"authorization,omitempty"` DataAssetsSent []string `yaml:"data_assets_sent,omitempty"` DataAssetsReceived []string `yaml:"data_assets_received,omitempty"` }
type Measure ¶ added in v0.1.7
type Measure struct { Id string `yaml:"id"` Action string `yaml:"action"` Justification string `yaml:"justification"` Ticket string `yaml:"ticket"` CheckedBy string `yaml:"checked_by"` ResidualImpact int64 `yaml:"residual_impact"` ResidualLikelihood int64 `yaml:"residual_likelihood"` ResidualSeverity int64 `yaml:"residual_severity"` Status string `yaml:"status"` }
type ProfileSet ¶ added in v0.1.7
type ProfileSet struct { Name string `yaml:"name"` Description string `yaml:"description,omitempty"` TerraformProvider string `yaml:"terraform_provider,omitempty"` Technologies []Technology `yaml:"technologies,omitempty"` }
ProfileSet represents a mapping profile to cloud technologies
func LoadProfileSet ¶ added in v0.1.7
func LoadProfileSet(fileName string) ProfileSet
LoadProfileSet opens a profile file and loads it into the ProfileSet model Please, node that the Risks property is empty.
type Report ¶
type Report struct { ThreatAgents []ThreatAgent `yaml:"threat_agents,omitempty"` DataAssets []DataAsset `yaml:"data_assets,omitempty"` TechnicalAssets []TechnicalAsset `yaml:"technical_assets,omitempty"` TrustBoundaries []TrustBoundary `yaml:"trust_boundaries,omitempty"` Risks []Risk `yaml:"risks,omitempty"` RiskTracking []Measure `yaml:"risk_tracking,omitempty"` Title string `yaml:"title,omitempty"` Version string `yaml:"version,omitempty"` Customer string `yaml:"customer,omitempty"` Date string `yaml:"date,omitempty"` Author Author `yaml:"author,omitempty"` RuleSet RuleSet `yaml:"ruleset,omitempty"` }
Evaluation Report
type ReportEngine ¶
type ReportEngine struct {
// contains filtered or unexported fields
}
Taralzer struct
func (*ReportEngine) GenerateReport ¶
func (svc *ReportEngine) GenerateReport(wr io.Writer, tplFile string, report Report)
GenerateReport uses the golang template file 'tplFile' to generate a text report. Several templates have been defined and stored in the 'templates'directory'
func (*ReportEngine) GenerateReportFile ¶
func (svc *ReportEngine) GenerateReportFile(filename string, tplFile string, report Report)
GenerateReportFile creates a report to the file 'filename' on the local file system
func (*ReportEngine) GenerateReportFilePDF ¶
func (svc *ReportEngine) GenerateReportFilePDF(filename string, tplFileReport string, tplFileCover string, report Report)
GenerateReportFilePDF creates a report to the file 'filename' on the local file system It uses the 'wkhtmltopdf' command line tool that should be available in the path
func (*ReportEngine) GetTemplateDir ¶
func (svc *ReportEngine) GetTemplateDir() string
GetTemplateDir returns the directory of the template files
type Risk ¶
type Risk struct { Id string `yaml:"id"` Cwe int64 `yaml:"cwe"` Title string `yaml:"title"` Description string `yaml:"description"` Message string `yaml:"message"` Url string `yaml:"url"` Impact int64 `yaml:"impact"` Likelihood int64 `yaml:"likelihood"` Severity int64 `yaml:"severity"` Action string `yaml:"action"` Mitigation string `yaml:"mitigation"` ResidualImpact int64 `yaml:"residual_impact"` ResidualLikelihood int64 `yaml:"residual_likelihood"` ResidualSeverity int64 `yaml:"residual_severity"` Status string `yaml:"status"` }
Defines a risk identifed in model
type Rule ¶
type Rule struct { Id string `yaml:"id"` Cwe int64 `yaml:"cwe"` Title string `yaml:"title"` Description string `yaml:"description"` Mitigation string `yaml:"mitigation"` Url string `yaml:"url"` Impact int64 `yaml:"impact"` Likelihood int64 `yaml:"likelihood"` Severity int64 `yaml:"severity"` }
rules
type RuleSet ¶
type RuleSet struct { Name string `yaml:"name"` Title string `yaml:"title"` Description string `yaml:"description,omitempty"` Version string `yaml:"version,omitempty"` Url string `yaml:"url,omitempty"` Rules []Rule `yaml:"rules,omitempty"` }
RulSet repesents a ruleset
type StringWriter ¶
type StringWriter struct {
// contains filtered or unexported fields
}
func NewStringWriter ¶
func NewStringWriter(buf *string) StringWriter
func (StringWriter) String ¶
func (sw StringWriter) String() string
type Taralizer ¶
type Taralizer struct {
// contains filtered or unexported fields
}
Taralzer struct
func NewTaralizer ¶
New creates a new instance of the Taralizer engine.
func (*Taralizer) Evaluate ¶
Evaluate executes an Open Policy Agent (OPA) query against the rule sets and stores the resulting risks into the returned report.
type TechnicalAsset ¶
type TechnicalAsset struct { Id string `yaml:"id"` Name string `yaml:"name"` Description string `yaml:"description,omitempty"` Confidentiality string `yaml:"confidentiality,omitempty"` Integrity string `yaml:"integrity,omitempty"` Availability string `yaml:"availability,omitempty"` Technology string `yaml:"technology,omitempty"` Puml string `yaml:"puml,omitempty"` UsedAsClientByHuman bool `yaml:"used_as_client_by_human,omitempty"` OutOfScope bool `yaml:"out_of_scope,omitempty"` Internet bool `yaml:"internet,omitempty"` DataAssetsStored []string `yaml:"data_assets_stored,omitempty"` DataAssetsProcessed []string `yaml:"data_assets_processed,omitempty"` CommunicationLinks []CommunicationLink `yaml:"communication_links,omitempty"` }
type Technology ¶ added in v0.1.7
type Technology struct { Id string `yaml:"id"` Name string `yaml:"name"` Type string `yaml:"type"` Terraform string `yaml:"terraform"` }
Technology represents a mapping to cloud technology
type ThreatAgent ¶
type TrustBoundary ¶
type TrustBoundary struct { Id string `yaml:"id"` Name string `yaml:"name"` Description string `yaml:"description,omitempty"` Technology string `yaml:"technology,omitempty"` Puml string `yaml:"puml,omitempty"` TrustBoundariesNested []string `yaml:"trust_boundaries_nested,omitempty"` TechnicalAssetsInside []string `yaml:"technical_assets_inside,omitempty"` ThreatAgentsInside []string `yaml:"threat_agents_inside,omitempty"` }