mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
feat(three-stage-scan): add aliased-sink mutation the regex scan misses
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
"""Mutation of os.system: the callable is aliased before use so a same-line regex misses it."""
|
||||
import os
|
||||
|
||||
from flask import Flask, request
|
||||
|
||||
app = Flask(__name__)
|
||||
run_cmd = os.system
|
||||
|
||||
|
||||
@app.get("/ping")
|
||||
def ping():
|
||||
host = request.args["host"]
|
||||
return run_cmd("ping -c 1 " + host) # CWE-78 mutation: os.system aliased before the call
|
||||
Reference in New Issue
Block a user