Skip to content

Commit

Permalink
Merge pull request #3026 from returntocorp/merge-develop-to-release
Browse files Browse the repository at this point in the history
Merge Develop into Release
  • Loading branch information
kurt-r2c authored Aug 4, 2023
2 parents 9c8fbac + 57fcb9c commit 1f7129d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/lang/security/audit/sqli/asyncpg-sqli.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ def bad10(conn: asyncpg.Connection):
# ruleid: asyncpg-sqli
cur = await conn.cursor(sql_query)

def bad11(conn: asyncpg.Connection):
import common
# ruleid: asyncpg-sqli
cur = conn.fetch(common.bad_query_1.format(user_input))

def ok1(user_input):
con = await asyncpg.connect(user='postgres')
# ok: asyncpg-sqli
Expand Down
1 change: 1 addition & 0 deletions python/lang/security/audit/sqli/asyncpg-sqli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ rules:
$QUERY = '...' % ()
...
- pattern: $CONN.$METHOD(..., $X + $Y, ...)
- pattern: $CONN.$METHOD(..., $Y.format(...), ...)
- pattern: $CONN.$METHOD(..., '...'.format(...), ...)
- pattern: $CONN.$METHOD(..., '...' % (...), ...)
- pattern: $CONN.$METHOD(..., f'...{$USERINPUT}...', ...)
Expand Down

0 comments on commit 1f7129d

Please sign in to comment.