Skip to content

Commit

Permalink
Merge pull request #8 from swisstxt/repush-source
Browse files Browse the repository at this point in the history
Revert "Remove all sources"
  • Loading branch information
srgoni authored Aug 18, 2023
2 parents 88346a5 + 3f78e24 commit a0c6652
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
django = "1.3.0"

[dev-packages]

[requires]
python_version = "3.11"
28 changes: 28 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions bicep/test.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
resource symbolicname 'Microsoft.KeyVault/vaults@2022-07-01' = {
name: 'hackme'
location: 'eastus'
properties: {
publicNetworkAccess: 'enabled'
sku: {
family: 'A'
name: 'standard'
}
tenantId: '[subscription().tenantId]'
}
}
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/swisstxt/secscan-demo

go 1.19

require golang.org/x/net v0.12.0
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50=
golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
18 changes: 18 additions & 0 deletions go/test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package main

import (
"bytes"
"math/rand"
"golang.org/x/net/html"
)

func main() {
source := bytes.NewBufferString(`<html><body><p>&</p></body></html>`)
parsed, err := html.Parse(source)
if err != nil {
panic(err)
}
buffer := &bytes.Buffer{}
html.Render(buffer, parsed)
rand.Int()
}
17 changes: 17 additions & 0 deletions python/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import hashlib
from django.forms import formsets
from django.db import connection

try:
suppressed_exception()
except Exception:
pass

formsets.formset_factory("vulnerable")

hashlib.md5('invalid').hexdigest()

user = "hackme"
with connection.cursor() as cursor:
cursor.execute(f"SELECT * FROM users WHERE username = {user}")
user = cursor.fetchone()
30 changes: 30 additions & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}

provider "aws" {
region = "us-east-1"
}

resource "aws_s3_account_public_access_block" "this" {
block_public_acls = false
block_public_policy = false
ignore_public_acls = false
restrict_public_buckets = false
}

resource "aws_s3_bucket" "vulnerable" {
bucket = "i-am-vulnerable"
}

resource "aws_s3_bucket_public_access_block" "vulnerable" {
bucket = aws_s3_bucket.vulnerable.id
block_public_acls = false
block_public_policy = false
ignore_public_acls = false
restrict_public_buckets = false
}

0 comments on commit a0c6652

Please sign in to comment.