Skip to content

Commit

Permalink
Update the python rules #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Dattaprasad Mundada authored and Dattaprasad Mundada committed Mar 8, 2023
1 parent 21ce4ba commit f49ba7c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
5 changes: 3 additions & 2 deletions config/sinkSkipList/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ sinkSkipList:
name: Skip Third Party Sinks
patterns:
- "(dict|list|str|tuple|int)\\.__.*"
- "(django.*\\.py).*"
- "(django.*\\.py|selenium).*"
- "\\/.*[.]py.*"
- "__builtin\\..*"
- "(?i)(builtins|operator|ast|jwt|hashlib|six|glob|json|html2text|yaml|re|copy|argparse|datetime|time|decimal|collections|asyncio|subprocess|pytest|logging|traceback|sys|os|oss2|unittest|base64|dateutil|importlib|socket|urllib3|urllib|io|uuid|gzip|math|bson|random|xmltodict|shutil|tempfile)\\.py.*"
- "(cls|ModelClass|assoc|result)\\..*"
- "(?i)(builtins|stringio|operator|ast|jwt|cookielib|hashlib|urlparse|hmac|six|glob|json|html2text|yaml|re|copy|argparse|datetime|time|decimal|collections|asyncio|subprocess|pytest|logging|traceback|sys|os|oss2|unittest|base64|dateutil|importlib|socket|urllib3|urllib|io|uuid|gzip|math|bson|random|xmltodict|shutil|tempfile)\\.py.*"

- id: SinkSkipList.BuiltInLib
name: Skip built in language libraries
Expand Down
4 changes: 2 additions & 2 deletions config/systemConfig/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ systemConfig:
value: (?i)(request|aiohttp|treq|grequests|urllib|http|uplink|httoop|flask_restful|tornado.httpclient|pycurl|bs4|.*(HttpClient)).*

- key: apiSinks
value: (?i).*(?:url|client|get|set|post|put|patch|delete|head|options|request|feed|trigger|init|find|send|receive|redirect|fetch|execute|response|pool|client|http|load|list|trace|remove|write|provider|host|access|info_read|select|perform).*
value: (?i).*(?:url(?!(open|encode))|client|get|set|post|put|patch|delete|head|options|request|feed|trigger|init|find|send|receive|redirect|fetch|execute|response|pool|client|http|load|list|trace|remove|write|provider|host|access|info_read|select|perform).*

- key: apiIdentifier
value: (?i).*((hook|base|authorize|provider|endpoint|installation)(s){0,1}_url|(slack|web)_hook|(rest|api)_endpoint).*
value: (?i).*((hook|base|authorize|provider|endpoint|installation|cloud|host)(s){0,1}_url|(slack|web)_hook|(rest|api|host|cloud)_endpoint).*
1 change: 1 addition & 0 deletions rules/sinks/storages/dynamodb/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ sinks:
- aws.amazon.com
- amazon.com
patterns:
- "(?i)boto.*dynamodb.*"
- "(?i)boto.*(?:get.{0,1}item|query).*"
tags:

Expand Down
13 changes: 0 additions & 13 deletions rules/sinks/third_parties/sdk/jhuapl/python.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion rules/sinks/third_parties/sdk/slack/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ sinks:
patterns:
- "(?i)(slack_discovery_sdk|slack_sdk|slackclient|slackeventsapi|airflow.*providers.*slack|slack_webhook).*"
- "(?i)((slack_sdk|django_slack).*message|slack[_]webhook.*post)"
- "(?i).*slack_hook.*"
- "(?i).*slack_(hook|message).*"
tags:

0 comments on commit f49ba7c

Please sign in to comment.