Documentation ¶
Index ¶
Constants ¶
const VERSION = "0.1.0"
VERSION is current package version.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditNote ¶
type AuditNote struct { Name string `json:"name"` Class int `json:"class"` ScoreCap int `json:"score_cap"` ScoreAdjust int `json:"score_adjust"` Notes string `json:"notes"` }
AuditNote holds information on a given algorithm identified in a scan.
type CategorySummary ¶
CategorySummary holds a summary of good algorithms and total algorithms.
type Client ¶
Client represents an SSH Audit client.
func (*Client) PolicyServerAudit ¶
func (c *Client) PolicyServerAudit(server string, port int, policyName string) (*PolicyServerAuditInfo, error)
PolicyServerAudit runs a policy server audit on a given server.
A policy audit determines if the target adheres to a specific set of expected options. The resulting score is either pass or fail. Policy audits are useful for ensuring a server has been successfully (and remains) hardened.
func (*Client) StandardServerAudit ¶
func (c *Client) StandardServerAudit(server string, port int) (*StandardServerAuditInfo, error)
StandardServerAudit runs a standard server audit on a given server.
A standard audit evaluates each of the individual cryptographic algorithms supported by the target. An overall score is given based on how many strong, acceptable, and weak options are available.
type Finding ¶
type Finding struct { FindingSummaryTitle string `json:"finding_summary_title"` FindingSummaryBody string `json:"finding_summary_body"` FindingSolution string `json:"finding_solution"` FindingReferences []string `json:"finding_references"` FindingAffected []string `json:"finding_affected"` }
Finding holds details of issues identified during scan.
type HTTPClientError ¶
HTTPClientError custom error to handle with response status.
func (*HTTPClientError) Error ¶
func (e *HTTPClientError) Error() string
type PingInfo ¶
type PingInfo struct { CSRFToken string `json:"csrf_token"` ServerPolicyNames []string `json:"server_policy_names"` ClientPolicyNames []string `json:"client_policy_names"` }
PingInfo holds information from a sshaudit.com/ping response.
type PolicyError ¶
type PolicyError struct { Actual []string `json:"actual"` ExpectedOptional []string `json:"expected_optional"` ExpectedRequired []string `json:"expected_required"` MismatchedField string `json:"mismatched_field"` }
PolicyError holds information on policy errors from an audit.
type PolicyServerAuditInfo ¶
type PolicyServerAuditInfo struct { AuditType string `json:"audit_type"` TargetServer string `json:"target_server"` TargetServerIP string `json:"target_server_ip"` PolicyName string `json:"policy_name"` Passed bool `json:"passed"` PolicyErrors []*PolicyError `json:"policy_errors"` }
PolicyServerAuditInfo holds response from a policy server audit.
type StandardServerAuditInfo ¶
type StandardServerAuditInfo struct { AuditType string `json:"audit_type"` Banner string `json:"banner"` Kex []*AuditNote `json:"kex"` Key []*AuditNote `json:"key"` Enc []*AuditNote `json:"enc"` Mac []*AuditNote `json:"mac"` Fin []string `json:"fin"` Score int `json:"score"` Grade string `json:"grade"` Version string `json:"version"` TargetServer string `json:"target_server"` TargetServerPort int `json:"target_server_port"` TargetServerIP string `json:"target_server_ip"` Findings []*Finding `json:"findings"` CategorySummaries map[string]*CategorySummary `json:"category_summaries"` }
StandardServerAuditInfo holds results from a standard server audit.