This file contains hidden or 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
| after: function(client, done) { | |
| //Browser closes here | |
| client.end(function() { | |
| done(); | |
| }); | |
| let scan_id; | |
| let scan_status = 0; | |
| //ZAP Scan Starts here | |
| setTimeout(() => { | |
| axios.post(zapApi, { |
This file contains hidden or 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
| module.exports.startZap = async function(done) { | |
| await axios.post(zapApi, { | |
| method: "start_zap_scanner", | |
| jsonrpc: "2.0", | |
| id: 0 | |
| }) | |
| .then(res => { | |
| console.log(res.data); | |
| }) | |
| .catch(err => { |
This file contains hidden or 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
| "Login to weCare App": function(client) { | |
| client | |
| .url(client.launchUrl + "/login/") | |
| .waitForElementVisible("body",1000) | |
| .assert.visible("input[type=email]") | |
| .assert.visible("input[type=password]") | |
| .setValue("input[type=email]", '[email protected]') | |
| .setValue("input[type=password]", 'secdevops') | |
| .click("button[id=submit]") | |
| .waitForElementVisible("body",1000) |
This file contains hidden or 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
| resource "aws_key_pair" "inspectkey" { | |
| public_key = "${file(var.PATH_TO_PUB_KEY)}" | |
| } | |
| resource "aws_instance" "inspector-instance" { | |
| ami = "${lookup(var.AMIS, var.AWS_REGION)}" | |
| instance_type = "m1.small" | |
| key_name = "${aws_key_pair.inspectkey.key_name}" | |
| security_groups = ["inspect"] |
This file contains hidden or 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
| resource "aws_inspector_resource_group" "bar" { | |
| tags { | |
| Name = "${aws_instance.inspector-instance.tags.Name}" | |
| } | |
| } | |
| resource "aws_inspector_assessment_target" "myinspect" { | |
| name = "inspector-instance-assessment" | |
| resource_group_arn = "${aws_inspector_resource_group.bar.arn}" | |
| } |
This file contains hidden or 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
| client.scan(TableName = 'dynamo-user', Select = 'ALL_ATTRIBUTES', | |
| ScanFilter = {'first_name': {"AttributeValueList": [{"S": "Joe"}], | |
| "ComparisonOperator": "EQ"}, 'last_name': {"AttributeValueList": [{"S": "Sixpack"}], "ComparisonOperator": "EQ"}}) |
This file contains hidden or 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
| client.scan(TableName = 'dynamo-user', Select = 'ALL_ATTRIBUTES', | |
| ScanFilter = {'first_name': {"AttributeValueList": [{"S": "*"}], | |
| "ComparisonOperator": "GT"}, | |
| 'last_name': {"AttributeValueList": [{"S": "*"}], | |
| "ComparisonOperator": "GT"}}) | |
| # All results from the Database are retrieved, similar to a 1=1 SQL Injection payload | |
| client.scan(TableName = 'dynamo-user', Select = 'ALL_ATTRIBUTES', |
This file contains hidden or 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
| from Crypto.Cipher import AES | |
| import boto3 | |
| from huepy import * | |
| import os | |
| import base64 | |
| from sys import exit | |
| pad = lambda s: s + (32 - len(s) % 32) * ' ' | |
| plaintext_message = "Hello from we45" | |
| client = boto3.client('kms') |
This file contains hidden or 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
| resource "aws_kms_key" "oauth_config" { | |
| description = "oauth config" | |
| is_enabled = true | |
| enable_key_rotation = true | |
| tags { | |
| Name = "OAuth Key" | |
| } | |
| } | |
| data "aws_kms_ciphertext" "oauth" { |
This file contains hidden or 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
| resource "aws_kms_key" "test_key" { | |
| description = "This is a test key that has a policy attached to it" | |
| is_enabled = true | |
| enable_key_rotation = true | |
| tags { | |
| Name = "Test Key with Policy" | |
| } | |
| } | |
| data "aws_iam_policy_document" "appkeypolicy" { |