Documentation
¶
Index ¶
- Constants
- type ATS
- type ATSDomain
- type Advisory
- type AdvisoryMetadata
- type Analyzer
- type AndroidAnalyzer
- type ApplicationInfo
- type AuditResult
- type BroadcastReceiver
- type CsharpAnalyzer
- type Engine
- type IOSAnalyzer
- type IntentAction
- type IntentCategory
- type IntentFilter
- type JavaAnalyzer
- type JavaScriptAnalyzer
- type Manifest
- type ManifestActivity
- type NPM
- type NPMAdvisoryPayload
- type NPMDependency
- type NpmAdvisory
- type POM
- type POMDependencies
- type PackageJSON
- type Permission
- type Plist
- type PlistPermission
- type SDKInfo
- type Service
- type TechAnalyzer
Constants ¶
const ( // UnknownStatus is the default status for a Manifest permission UnknownStatus string = "Desconhecido" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ATS ¶
type ATS struct {
AllowArbitraryLoads bool `json:"arbitraryLoads"` // NSAllowsArbitraryLoads
ExceptionDomains []ATSDomain `json:"exceptionDomains"` // NSExceptionDomains
}
ATS holds data about rules in the ATS section
type ATSDomain ¶
type ATSDomain struct {
Name string `json:"name"`
RequiresFowardSecrecy bool `json:"requiresFowardSecrecy"` // NSExceptionRequiresForwardSecrecy
IncludesSubdomains bool `json:"includesSubdomains"` // NSIncludesSubdomains
AllowsInsecureHTTPLoads bool `json:"allowInsecureHTTPLoads"` // NSTemporaryExceptionAllowsInsecureHTTPLoads
}
ATSDomain is a domain put in the exceptions settings for App Transport Security
type Advisory ¶
type Advisory struct {
ID int `json:"id"`
Metadata AdvisoryMetadata `json:"metadata"`
// Module info
ModuleName string `json:"module_name"`
PatchedVersions string `json:"patched_versions"`
VulnerableVersions string `json:"vulnerable_versions"`
// Vulnerability info
ReferenceURL string `json:"url"`
CVEs []string `json:"cves"`
CWE string `json:"cwe"`
Title string `json:"title"`
Severity string `json:"severity"`
Overview string `json:"overview"`
References string `json:"references"`
Recomendation string `json:"recommendation"`
}
Advisory holds data about the advisories section
type AdvisoryMetadata ¶
type AdvisoryMetadata struct {
ModuleType string `json:"module_type"`
Exploitability int `json:"exploitability"`
}
AdvisoryMetadata self-explained
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
func NewAnalyzer ¶
func NewAnalyzer(engine Engine, tech TechAnalyzer, logger *log.Logger) *Analyzer
type AndroidAnalyzer ¶
type AndroidAnalyzer struct {
// contains filtered or unexported fields
}
func NewAndroidAnalyzer ¶
func NewAndroidAnalyzer(logger *log.Logger) AndroidAnalyzer
type ApplicationInfo ¶
type ApplicationInfo struct {
Activities []ManifestActivity `xml:"activity"`
BroadcastReceivers []BroadcastReceiver `xml:"receiver"`
Services []Service `xml:"service"`
}
ApplicationInfo holds app data from AndroidManifest.xml
type AuditResult ¶
type BroadcastReceiver ¶
type BroadcastReceiver struct {
Name string `xml:"name,attr"`
}
BroadcastReceiver holds data about a broadcast receiver entry in AndroidManifest.xml
type CsharpAnalyzer ¶
type CsharpAnalyzer struct {
}
func NewCsharpAnalyzer ¶
func NewCsharpAnalyzer() CsharpAnalyzer
type IOSAnalyzer ¶
type IOSAnalyzer struct {
// contains filtered or unexported fields
}
func NewIosAnalyzer ¶
func NewIosAnalyzer(logger *log.Logger) IOSAnalyzer
type IntentAction ¶
type IntentAction struct {
Name string `xml:"name,attr"`
}
IntentAction represents a Action for the Android Activity.
type IntentCategory ¶
type IntentCategory struct {
Name string `xml:"name,attr"`
}
IntentCategory holds data about the Activity category.
type IntentFilter ¶
type IntentFilter struct {
Actions []IntentAction `xml:"action"`
Categories IntentCategory `xml:"category"`
}
IntentFilter holds metadata about the `intention-filter` tag for the given Activity.
type JavaAnalyzer ¶
type JavaAnalyzer struct {
// contains filtered or unexported fields
}
func NewJavaAnalyzer ¶
func NewJavaAnalyzer(logger *log.Logger) JavaAnalyzer
type JavaScriptAnalyzer ¶
type JavaScriptAnalyzer struct {
// contains filtered or unexported fields
}
func NewJavaScriptAnalyzer ¶
func NewJavaScriptAnalyzer(npm NPM, logger *log.Logger) JavaScriptAnalyzer
type Manifest ¶
type Manifest struct {
PackageName string `xml:"package,attr"`
Permissions []Permission `xml:"uses-permission"`
SDKInfo SDKInfo `xml:"uses-sdk"`
Application ApplicationInfo `xml:"application"`
VersionName string `xml:"versionName,attr"`
VersionCode string `xml:"versionCode,attr"`
}
Manifest holds all the data about the AndroidManifest file
type ManifestActivity ¶
type ManifestActivity struct {
Name string `xml:"name,attr"`
IntentFilter IntentFilter `xml:"intent-filter"`
}
ManifestActivity holds data from the `activities` tag in the AndroidManifest.xml file
type NPM ¶
type NPM interface {
AuditLibraries(PackageJSON) (AuditResult, error)
}
type NPMAdvisoryPayload ¶
type NPMAdvisoryPayload struct {
Name string `json:"name"`
Version string `json:"version"`
RequiredLibraries map[string]string `json:"requires"`
Dependencies map[string]NPMDependency `json:"dependencies"`
}
NPMAdvisoryPayload holds a DTO for sending Library information to the NPM Advisory API
type NPMDependency ¶
type NPMDependency struct {
Version string `json:"version"`
}
NPMDependency is a DTO for dependencies sent over to NPM's API
type NpmAdvisory ¶
type NpmAdvisory struct {
// contains filtered or unexported fields
}
func NewNPMAdvisory ¶
func NewNPMAdvisory(url, userAgent string, timeout time.Duration) NpmAdvisory
func (NpmAdvisory) AuditLibraries ¶
func (npm NpmAdvisory) AuditLibraries(pkgJSON PackageJSON) (AuditResult, error)
AuditLibraries gets the information from NPM Advisory API for the given pkgJSON
type POM ¶
type POM struct {
Name string `xml:"name"`
Version string `xml:"version"`
GroupID string `xml:"groupId"`
PackagingMode string `xml:"packaging"`
ArtifactID string `xml:"artifactId"`
Description string `xml:"description"`
Dependencies []POMDependencies `xml:"dependencies>dependency"`
}
POM or the Project Object Model is the fundamental unit on a Maven based project.
type POMDependencies ¶
type POMDependencies struct {
GroupID string `xml:"groupId"`
ArtifactID string `xml:"artifactId"`
Version string `xml:"version"`
}
POMDependencies holds data about external objects of a POM project
type PackageJSON ¶
type PackageJSON struct {
// General information
Name string `json:"name"`
Version string `json:"version"`
IsPrivate bool `json:"private"`
License string `json:"license"`
// Metadata about the root package
SupportedOSs []string `json:"os"`
SupportedCPUArchitectures []string `json:"cpu"`
SupportedEngines map[string]string `json:"engines"`
Keywords []string `json:"keywords"`
// Main information that we are looking for :D
Dependencies map[string]string `json:"dependencies"`
}
type Permission ¶
type Permission struct {
Name string `xml:"name,attr"`
}
Permission is a AndroidManifest permission entry
type Plist ¶
type Plist struct {
Compiler string `json:"compiler"` // DTCompiler
PlatformName string `json:"platformName"` // DTPlatformName
PlatformBuild string `json:"platformBuild"` // DTPlatformBuild
PlatformVersion string `json:"platformVersion"` // DTPlatformVersion
XCodeVersion string `json:"xcodeVersion"` // DTXcode
XCodeBuild string `json:"xcodeBuildNumber"` // DTXcodeBuild
SDKName string `json:"sdkName"` // DTSDKName
SDKBuild string `json:"DTSDKBuild"` // DTSDKBuild
BundleName string `json:"bundleName"` // CFBundleName
BundleVersion string `json:"bundleVersion"` // CFBundleVersion
ExecutableName string `json:"executableName"` // CFBundleExecutable
DisplayName string `json:"displayName"` // CFBundleDisplayName
AppIdentifier string `json:"appIdentifier"` // CFBundleIdentifier
PackageType string `json:"packageType"` // CFBundlePackageType
MinimumOSVersion string `json:"minOSVersion"` // MinimumOSVersion
Permissions []PlistPermission `json:"permissions"` // NS*UsageDescription section
ATS ATS `json:"ats"` // NSAppTransportSecurity section
SupportedPlatforms []string `json:"supportedPlatforms"` // CFBundleSupportedPlatforms section
}
Plist structure holds data in the Property List
type PlistPermission ¶
PlistPermission holds data about how the app will use certain permissions
type SDKInfo ¶
type SDKInfo struct {
MinimumSDKVersion string `xml:"minSdkVersion,attr"`
TargetSDKVersion string `xml:"targetSdkVersion,attr"`
MaximumSDKVersion string `xml:"maxSdkVersion,attr"`
}
SDKInfo is the AndroidManifest informative entry
