-
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.
Merge pull request #23 from devaa-security/u/s5dev/webview-detections
Add WebView Common weakness detections
- Loading branch information
Showing
25 changed files
with
926 additions
and
556 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export {run} from '@oclif/core' | ||
export { run } from "@oclif/core"; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,51 @@ | ||
import {BasePlugin} from './BasePlugin' | ||
import {Severity} from './util' | ||
import { BasePlugin } from "./BasePlugin"; | ||
import { Severity } from "./util"; | ||
|
||
export default abstract class ManifestPlugin extends BasePlugin { | ||
static manifestPath = ''; | ||
static manifestPath = ""; | ||
static manifestXMLObject: any = null; | ||
static minSdk = -1; | ||
static targetSdk = -1; | ||
static packageName = 'PACKAGE_NOT_FOUND'; | ||
static androidProjectDirectory = ''; | ||
static packageName = "PACKAGE_NOT_FOUND"; | ||
static androidProjectDirectory = ""; | ||
static isASTEnabled = false; | ||
|
||
// add constructor accepting category, severity and description | ||
constructor(category: string, severity: Severity, description: string) { | ||
// console.log("ManifestPlugin constructor") | ||
super(category, severity, description) | ||
super(category, severity, description); | ||
} | ||
|
||
static updateManifest( | ||
manifestXMLObject: any, | ||
ManifestPath: string, | ||
projectDirectory: any, | ||
isASTEnabled: boolean, | ||
isASTEnabled: boolean | ||
) { | ||
// Users of this class should call this method instead of changing class attributes directly | ||
this.manifestXMLObject = manifestXMLObject | ||
this.manifestPath = ManifestPath | ||
this.androidProjectDirectory = projectDirectory | ||
this.isASTEnabled = isASTEnabled | ||
this.manifestXMLObject = manifestXMLObject; | ||
this.manifestPath = ManifestPath; | ||
this.androidProjectDirectory = projectDirectory; | ||
this.isASTEnabled = isASTEnabled; | ||
|
||
try { | ||
this.minSdk = | ||
manifestXMLObject.manifest.usesSdk[0].$['android:minSdkVersion'] | ||
manifestXMLObject.manifest.usesSdk[0].$["android:minSdkVersion"]; | ||
this.targetSdk = | ||
manifestXMLObject.manifest.usesSdk[0].$['android:targetSdkVersion'] | ||
manifestXMLObject.manifest.usesSdk[0].$["android:targetSdkVersion"]; | ||
} catch { | ||
// manifest path is not set, assume minSdk and targetSdk | ||
this.minSdk = this.targetSdk = 1 | ||
this.minSdk = this.targetSdk = 1; | ||
} | ||
|
||
try { | ||
this.packageName = manifestXMLObject.manifest.$.package | ||
this.packageName = manifestXMLObject.manifest.$.package; | ||
} catch { | ||
this.packageName = 'PACKAGE_NOT_FOUND' | ||
this.packageName = "PACKAGE_NOT_FOUND"; | ||
} | ||
} | ||
|
||
abstract run(): void; // User should define how their plugin runs | ||
} | ||
|
||
export {ManifestPlugin} | ||
export { ManifestPlugin }; |
Oops, something went wrong.