Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #376

Merged
merged 113 commits into from
Dec 18, 2023
Merged

Dev #376

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
1d86c5b
Merge pull request #211 from Privado-Inc/dev
hiteshbedre Mar 24, 2023
e9a8667
Merge pull request #215 from Privado-Inc/dev
hiteshbedre Mar 29, 2023
f6437df
Python GA support
hiteshbedre Mar 29, 2023
24aa667
Merge pull request #217 from Privado-Inc/python_readme
hiteshbedre Mar 29, 2023
11dd805
Merge pull request #220 from Privado-Inc/dev
khemrajrathore Apr 6, 2023
912bf8c
Merge pull request #222 from Privado-Inc/dev
khemrajrathore Apr 13, 2023
02d4be6
updated mac address rule (#225)
hiteshbedre Apr 15, 2023
90a9070
Merge pull request #224 from Privado-Inc/dev
pandurangpatil Apr 19, 2023
5b9c92f
Merge pull request #229 from Privado-Inc/dev
pandurangpatil Apr 21, 2023
26ec1df
Merge pull request #231 from Privado-Inc/dev
pandurangpatil Apr 27, 2023
afb47ca
Merge pull request #233 from Privado-Inc/dev
pandurangpatil May 3, 2023
8882be3
Merge pull request #238 from Privado-Inc/dev
khemrajrathore May 5, 2023
abdb1a7
Merge pull request #240 from Privado-Inc/dev
pandurangpatil May 11, 2023
707d612
Merge pull request #242 from Privado-Inc/dev
pandurangpatil May 15, 2023
e9b2613
Merge pull request #244 from Privado-Inc/dev
pandurangpatil May 17, 2023
5a5f924
Merge pull request #248 from Privado-Inc/dev
pandurangpatil May 31, 2023
2579b42
Merge pull request #258 from Privado-Inc/dev
pandurangpatil Jun 2, 2023
d1df68f
Added rules for third party sdks in the db (#266)
karan-batavia Jun 15, 2023
404738f
add - cookie as sink
khemrajrathore Jun 15, 2023
4e37789
add - merged cookie rules
khemrajrathore Jun 15, 2023
70bd27a
Merge pull request #267 from Privado-Inc/cookieAsSink
khemrajrathore Jun 15, 2023
0d0c2f7
Remove redundant ruby sdk rules
dbMundada Jun 16, 2023
8915728
Merge pull request #268 from Privado-Inc/remove-redundant-ruby-rules
khemrajrathore Jun 16, 2023
05898eb
Merge pull request #264 from Privado-Inc/dev
khemrajrathore Jun 16, 2023
e687608
Ruby/third party sdk secondary (#269)
karan-batavia Jun 16, 2023
8f81224
Handling of rule to select element split over multiple lines (#270)
pandurangpatil Jun 19, 2023
637acc4
Merge pull request #271 from Privado-Inc/dev
pandurangpatil Jun 20, 2023
694e34d
Update README.md (#272)
dbMundada Jun 22, 2023
eacdb95
Js sdk fixes (#274)
dbMundada Jun 29, 2023
a52a047
Merge pull request #275 from Privado-Inc/dev
pandurangpatil Jun 29, 2023
bdb392b
Ruby http libraries (#278)
dbMundada Jul 19, 2023
aedbee7
Update personal_characteristics.yaml
HiteshMah-Jan Jul 22, 2023
00ec548
Update biometric_data.yaml
HiteshMah-Jan Jul 22, 2023
0a37618
Merge pull request #279 from Privado-Inc/sources/p-chars
HiteshMah-Jan Jul 24, 2023
35ef43e
Ruby SDK + JS Fixes (#282)
dbMundada Jul 27, 2023
0d3345d
JS Fixes (#283)
dbMundada Jul 27, 2023
27ed015
Sources/click stream ddhq (#284)
HiteshMah-Jan Jul 29, 2023
787c2fb
vehicle registration rule
HiteshMah-Jan Jul 31, 2023
3850845
Laundarkly fix (#287)
dbMundada Aug 2, 2023
5046cd9
Merge branch 'main' of github.com:Privado-Inc/privado into master-merge
dbMundada Aug 2, 2023
4a96768
Merge pull request #291 from Privado-Inc/master-merge
dbMundada Aug 2, 2023
669f21c
Merge remote-tracking branch 'origin/dev' into sources/vehicle-data
Aug 2, 2023
40ac9c5
Merge remote-tracking branch 'origin/dev' into sources/biometric
Aug 2, 2023
dced08d
Merge pull request #289 from Privado-Inc/sources/vehicle-data
dbMundada Aug 2, 2023
133ad0a
Merge pull request #280 from Privado-Inc/sources/biometric
dbMundada Aug 2, 2023
0b53a04
Dev (#285)
dbMundada Aug 2, 2023
453f6e5
updated leakage rule (#292)
hiteshbedre Aug 3, 2023
18520d8
Merge pull request #293 from Privado-Inc/dev
khemrajrathore Aug 11, 2023
fa2c555
Ruby august release (#294)
khemrajrathore Aug 28, 2023
f7da5b0
Merge pull request #296 from Privado-Inc/dev
khemrajrathore Aug 28, 2023
daeeb1a
Python: Stripe Rule (#297)
hiteshbedre Aug 28, 2023
e28ed62
Python: Stripe Rule (#298)
hiteshbedre Aug 29, 2023
159a81d
Add Graphql rules as API rules (#299)
dbMundada Aug 31, 2023
c6ea78b
Add OpenAI sdk rules (#302)
dbMundada Sep 6, 2023
e5d58e5
Merge pull request #301 from Privado-Inc/dev
khemrajrathore Sep 6, 2023
a971df0
Removed duplicate rule (#303)
hiteshbedre Sep 6, 2023
4713e56
Removed duplicate rule (#303) (#304)
hiteshbedre Sep 6, 2023
310cce6
Update the LLM rules + Add Weviate DB (#306)
dbMundada Sep 11, 2023
7af1486
Added rules for ruby third party (#295)
ankit-privado Sep 11, 2023
9c00776
Update online_identifiers.yaml (#305)
khemrajrathore Sep 11, 2023
7e70bb8
Merge pull request #307 from Privado-Inc/dev
dbMundada Sep 11, 2023
d595403
[goSrc2cpg] - Added Golang storage rule (#309)
ankit-privado Sep 24, 2023
5e3bdcd
Go: leakage sink (#310)
hiteshbedre Sep 26, 2023
eb4f769
default config for zeromq sockets (#311)
tuxology Oct 3, 2023
6d6c8e8
Golang storage rule (#312)
hiteshbedre Oct 3, 2023
8c1cfd4
added zerolog rules for logs
ankit-privado Oct 4, 2023
2dd1a77
Merge pull request #313 from Privado-Inc/golang-zerolog-rule
ankit-privado Oct 4, 2023
aa493da
changed redis rules
ankit-privado Oct 4, 2023
f74c30e
Remove SQL Alchmey rule for python (#315)
dbMundada Oct 4, 2023
60d83b3
Merge pull request #314 from Privado-Inc/golang-redis-rules
ankit-privado Oct 5, 2023
0ae53f6
Go: Storage Rules (#317)
hiteshbedre Oct 5, 2023
a78f108
Golang storage rules (#318)
ankit-privado Oct 5, 2023
7a2535c
Merge pull request #316 from Privado-Inc/go
pandurangpatil Oct 5, 2023
0e1bb1f
parallel processing for comparisom report (#321)
karan-batavia Oct 9, 2023
edcc200
parallel processing for comparison report (#324)
karan-batavia Oct 9, 2023
c541ffb
Parallel comparison report (#326)
karan-batavia Oct 10, 2023
c932b61
Delete zamaon sdk (#328)
HiteshMah-Jan Oct 10, 2023
71eef7c
added go exclusion rule (#329)
ankit-privado Oct 10, 2023
ca8bf85
vertx.io is not a third party, its a toolkit
HiteshMah-Jan Oct 13, 2023
e18d51c
Merge pull request #333 from Privado-Inc/rules/tp-sdk-vertx
HiteshMah-Jan Oct 24, 2023
5231cdf
Update Account Password.
HiteshMah-Jan Oct 26, 2023
39e2405
Merge pull request #336 from Privado-Inc/sources/acc-password
HiteshMah-Jan Oct 27, 2023
6abc40e
Go GORM rules (#338)
pandurangpatil Oct 30, 2023
03f880a
go: API Tagger (#331)
hiteshbedre Oct 30, 2023
ed48f2b
[gosrc2cpg] - Added third party rules (#335)
ankit-privado Nov 1, 2023
679d061
[gosrc2cpg] - storage framework rules (#340)
ankit-privado Nov 1, 2023
dca0e6c
Update national_identification_numbers.yaml (#334)
HiteshMah-Jan Nov 2, 2023
2f59069
Python/3p/cherrypy (#308)
HiteshMah-Jan Nov 2, 2023
cdf39e6
change slack action to upload file (#342)
karan-batavia Nov 2, 2023
d7241ee
Kotlin poc (#344)
khemrajrathore Nov 7, 2023
a37f01b
Added go comparison report support (#345)
ankit-privado Nov 7, 2023
8737e90
fix path in comparison results (#346)
karan-batavia Nov 7, 2023
cfa908c
add - regex for exclusion templates in kotlin (#348)
khemrajrathore Nov 13, 2023
933a3ab
Google map and google play rule (#349)
khemrajrathore Nov 14, 2023
3ae4b1a
lng matches with short for language (#350)
HiteshMah-Jan Nov 14, 2023
bca5cc1
add rule for authy (#351)
khemrajrathore Nov 15, 2023
7d4aa50
spring java patch collection (#353)
HiteshMah-Jan Nov 15, 2023
69b9f9b
go exclusion rule fix (#354)
ankit-privado Nov 15, 2023
de2e614
Revert "go exclusion rule fix (#354)"
khemrajrathore Nov 16, 2023
6b673b1
Merge pull request #355 from Privado-Inc/golang/exclusionRevert
khemrajrathore Nov 16, 2023
6cf0f33
add datadog java sdks
HiteshMah-Jan Nov 24, 2023
196e952
add android collection rules (#356)
tuxology Nov 24, 2023
b2fffbf
added go third party rules (#358)
ankit-privado Nov 27, 2023
e9e4bdc
Merge pull request #357 from Privado-Inc/sdk-java-datadog
HiteshMah-Jan Nov 27, 2023
9f65258
Go additional rule (#361)
ankit-privado Nov 27, 2023
7690877
Go third party rule (#363)
ankit-privado Nov 28, 2023
a660dac
go github rule added (#365)
ankit-privado Dec 1, 2023
7260d35
add tags to link source to collections (#367)
tuxology Dec 6, 2023
f8d4b82
refine cookie storage rule (#369)
HiteshMah-Jan Dec 7, 2023
c0e58bc
Go APIHttp Libraries rule (#371)
ankit-privado Dec 12, 2023
423204a
Add few more android rules (#372)
tuxology Dec 12, 2023
719118a
fix java google pubsub
HiteshMah-Jan Dec 18, 2023
5dff60f
Merge pull request #374 from Privado-Inc/sinks/google/pubsub
khemrajrathore Dec 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 98 additions & 30 deletions .github/workflows/comparison-result.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
name: Monitoring Stability and Comparing Results for privado
name: Monitoring Stability and Comparing Results for privado

# Triggers when a pull_request or a push action is configured on master branch
# Triggers when a pull_request is created
on:
pull_request_target:
branches:
- "**"

jobs:
start_workflow:
runs-on: ubuntu-latest
steps:
- name: Send message to slack
id: initial-message
uses: archive/github-actions-slack@master
with:
slack-optional-parse: full
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_TOKEN }}
slack-channel: ${{ secrets.SLACK_CHANNEL_ID }}
slack-text: "Comparison workflow started for ${{github.event.pull_request.html_url}}"

- name: Save output to env
id: save-output
run: echo "INIT_MSG_TS=${{ fromJson(steps.initial-message.outputs.slack-result).response.message.ts }}" >> $GITHUB_OUTPUT
outputs:
init_message_ts: ${{steps.save-output.outputs.INIT_MSG_TS}}

setup_and_scan:
needs: start_workflow
strategy:
matrix:
language: ['java', 'python', 'js', 'ruby-1', 'ruby-2', 'go']
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install JDK-18
uses: actions/setup-java@v3
with:
Expand All @@ -31,48 +56,91 @@ jobs:
with:
repository: Privado-Inc/standalone-monitoring-stability
path: ./temp/standalone-monitoring-stability
ref: main
ref: main

- name: Run the script for ${{github.head_ref}} and ${{github.base_ref}}
run: cd ./temp/standalone-monitoring-stability && pip install -r requirements.txt && python3 ./run.py -rbb ${{github.base_ref}} -rbh ${{github.head_ref}} -brr ${{ github.event.pull_request.base.repo.html_url }} -hrr ${{ github.event.pull_request.head.repo.html_url }} -guf -urc
run: cd ./temp/standalone-monitoring-stability && pip install -r requirements.txt && python3 ./run.py -r ./repos/${{matrix.language}}.txt -rbb ${{github.base_ref}} -rbh ${{github.head_ref}} -brr ${{ github.event.pull_request.base.repo.html_url }} -hrr ${{ github.event.pull_request.head.repo.html_url }} -guf -urc

- name: Run aws-export
run: cd ./temp/standalone-monitoring-stability/ && python3 aws-export.py ${{github.event.number}}
run: cd ./temp/standalone-monitoring-stability/ && python3 aws-export.py ${{matrix.language}}-${{github.event.number}}

- name: Move results to a folder
run: cd ./temp/standalone-monitoring-stability/ && mkdir results && mv output-${{github.event.number}}.xlsx ./results/output-${{github.event.number}}.xlsx && mv ./temp/result-${{github.event.number}}.zip ./results/result-${{github.event.number}}.zip && mv slack_summary.txt ./results/slack_summary.txt
run: cd ./temp/standalone-monitoring-stability/ && mkdir results && mv output-${{matrix.language}}-${{github.event.number}}.xlsx ./results/output-${{matrix.language}}-${{github.event.number}}.xlsx && mv ./temp/result-${{matrix.language}}-${{github.event.number}}.zip ./results/result-${{matrix.language}}-${{github.event.number}}.zip && mv slack_summary.txt ./results/slack_summary.txt

- name: Zip the results
run: cd /home/runner/work/privado/privado/temp/standalone-monitoring-stability && zip result-${{matrix.language}}-${{github.event.number}}.zip -r ./results

- name: Set summary variable
run: |
echo "MESSAGE<<EOF" >> $GITHUB_ENV
echo "$(cat /home/runner/work/privado/privado/temp/standalone-monitoring-stability/results/slack_summary.txt)" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV

- name: Post results to slack
uses: adrey/slack-file-upload-action@master
with:
thread_ts: ${{needs.start_workflow.outputs.init_message_ts}}
channel: ${{ secrets.SLACK_CHANNEL_ID }} # check
path: "/home/runner/work/privado/privado/temp/standalone-monitoring-stability/result-${{matrix.language}}-${{github.event.number}}.zip"
initial_comment: "Comparison Results generated on ${{github.event.repository.name}} by PR ${{github.event.number}} from branch ${{github.head_ref}} to ${{github.base_ref}} \nPR link https://github.com/Privado-Inc/privado/pull/${{github.event.number}}\n Language: ${{matrix.language}} \nSummary Report:\n ${{ env.MESSAGE }}"
filetype: "zip"
token: ${{ secrets.SLACK_TOKEN }}

- name: Export workflow output
run: cd ./temp/standalone-monitoring-stability && python3 ./workflow_check.py /home/runner/work/privado/privado/temp/standalone-monitoring-stability/results/slack_summary.txt

- name: Upload output and result for next job
- name: Set summary variable
run: |
echo "MESSAGE<<EOF" >> $GITHUB_ENV
echo "$(cat ./temp/standalone-monitoring-stability/action_result.txt)" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV

- name: Upload summary file
uses: actions/upload-artifact@master
with:
name: results
path: /home/runner/work/privado/privado/temp/standalone-monitoring-stability/results
name: ${{matrix.language}}
path: /home/runner/work/privado/privado/temp/standalone-monitoring-stability/results/slack_summary.txt

send-result:
needs: setup_and_scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Workflow report analysis
if: ${{ env.MESSAGE != 'true' }}
run: exit 1

- name: Download result folder
collate_summary:
needs: [start_workflow, setup_and_scan]
runs-on: ubuntu-latest
steps:
- name: Download summary file
uses: actions/download-artifact@master
with:
name: results
path: ./results

- name: Zip the results
run: zip result-${{github.event.number}}.zip -r ./results
path: ./language_summary

- name: Install Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Clone standalone-monitoring-stability/flow-test
uses: actions/checkout@v3
with:
repository: Privado-Inc/standalone-monitoring-stability
path: ./temp/standalone-monitoring-stability
ref: main


- name: Collate summary
run: cd ./temp/standalone-monitoring-stability && pip install -r requirements.txt && python3 ./collate_summary.py -s /home/runner/work/privado/privado/language_summary

- name: Set summary variable
run: |
echo "MESSAGE<<EOF" >> $GITHUB_ENV
echo "$(cat ./results/slack_summary.txt)" >> $GITHUB_ENV
echo "$(cat /home/runner/work/privado/privado/temp/standalone-monitoring-stability/global_summary.txt)" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Post results to slack
uses: MeilCli/slack-upload-file@v3

- name: Send summary to slack
uses: slackapi/slack-github-action@v1.24.0
with:
slack_token: ${{ secrets.SLACK_TOKEN }}
channel_id: ${{ secrets.SLACK_CHANNEL_ID }}
file_path: "/home/runner/work/privado/privado/result-${{github.event.number}}.zip"
initial_comment: "Comparison Results generated on ${{github.event.repository.name}} by PR ${{github.event.number}} from branch ${{github.head_ref}} to ${{github.base_ref}} \nPR link https://github.com/Privado-Inc/privado/pull/${{github.event.number}} \nSummary Report:\n ${{ env.MESSAGE }}"
file_type: "zip"
update-ts: ${{needs.start_workflow.outputs.init_message_ts}}
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: "\nComparison Results generated on ${{github.event.repository.name}} by PR ${{github.event.number}} from branch ${{github.head_ref}} to ${{github.base_ref}} \nPR link https://github.com/Privado-Inc/privado/pull/${{github.event.number}}\nLanguage: All \nSummary Report:\n ${{ env.MESSAGE }}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,6 @@ dist
# files
privado
notes.md

#Directory created by IDE
workspace
5 changes: 5 additions & 0 deletions config/exclusions/go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
exclusions:
- id: Exclusions.Test
name: Exclude test source code
patterns:
- '.*_test\(s\)?.*'
2 changes: 1 addition & 1 deletion config/exclusions/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ exclusions:
- id: Exclusions.Empty
name: Exclude file which cannot be read
patterns:
- "<empty>"
- "<empty>"
5 changes: 5 additions & 0 deletions config/exclusions/kotlin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
exclusions:
- id: Exclusions.Template
name: Exclude template file
patterns:
- "(?i)(.*template.kt|.*template(s)?/.*)"
3 changes: 3 additions & 0 deletions config/systemConfig/default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
systemConfig:
- key: maxSocketCount
value: "4096"
9 changes: 9 additions & 0 deletions config/systemConfig/go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
systemConfig:
- key: apiHttpLibraries
value: ^(?i)(net/http|github.com/parnurzeal/gorequest|(gopkg.in|github.com/go-resty)/resty|valyala/fasthttp|github.com/gojektech/heimdall/v\\d/httpclient|github.com/levigross/grequests|github.com/PuerkitoBio/rehttp|github.com/machinebox/graphql).*

- key: apiSinks
value: (?i)(?:url|client|open|request|execute|newCall|load|host|access|list|set|put|post|proceed|trace|patch|Path|send|remove|delete|write|read|postForEntity|call|createCall|createEndpoint|dispatch|invoke|getInput|getOutput|getResponse|do)

- key: apiIdentifier
value: (?i).*((hook|base|auth|prov|endp|install|request|service|gateway|route|resource)(.){0,12}url|(slack|web)(.){0,4}hook|(rest|api|request|service)(.){0,4}(endpoint|gateway|route)).*
18 changes: 15 additions & 3 deletions config/systemConfig/javascript.yaml

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions config/systemConfig/kotlin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
systemConfig:
- key: apiHttpLibraries
value: ^(?i)(org.apache.http|okhttp|org.glassfish.jersey|com.mashape.unirest|java.net.http|java.net.URL|org.springframework.(web|core.io)|groovyx.net.http|org.asynchttpclient|kong.unirest.java|org.concordion.cubano.driver.http|javax.net.ssl|javax.xml.soap|org.apache.axis2|com.sun.xml.messaging.saaj|org.springframework.ws.client|com.eviware.soapui|org.apache.cxf|org.jboss.ws|com.ibm.websphere.sca.extensions.soap|com.sun.xml.ws|org.apache.camel.component.cxf|org.codehaus.xfire|org.apache.synapse|org.apache.wink.client|com.oracle.webservices.internal.api.databinding.Databinding|com.sap.engine.interfaces.webservices.runtime.client).*

- key: ignoredSinks
value: (?i).*(?<=map|list|jsonobject|json|array|arrays|jsonnode|objectmapper|objectnode).*(put:|get:).*

- key: apiSinks
value: (?i)(?:url|client|openConnection|request|execute|newCall|load|host|access|fetch|get|getInputStream|getApod|getForObject|getForEntity|list|set|put|post|proceed|trace|patch|Path|send|sendAsync|remove|delete|write|read|assignment|provider|exchange|postForEntity|call|createCall|createEndpoint|dispatch|invoke|newMessage|getInput|getOutput|getResponse|marshall|unmarshall|send|asyncSend)

- key: apiIdentifier
value: (?i).*((hook|base|auth|prov|endp|install|request|service|gateway|route|resource)(.){0,12}url|(slack|web)(.){0,4}hook|(rest|api|request|service)(.){0,4}(endpoint|gateway|route)).*
12 changes: 12 additions & 0 deletions config/systemConfig/ruby.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
systemConfig:
- key: apiHttpLibraries
value: (?i)(multipart|faraday|rest-client|httparty|http.client|net.http|curb|sawyer|unirest|excon|typhoeus|.*(Http(.){0,2}Client|RestClient|HTTParty|Faraday|Unirest)).*

- key: ignoredSinks
value: (?i).*(?<=map|list|jsonobject|json|array|arrays|jsonnode|objectmapper|objectnode).*(put:|get:).*

- key: apiSinks
value: (?i)(?:new|url|client|openConnection|request|execute|newCall|load|host|access|usequery|fetch|get|getInputStream|getApod|getForObject|getForEntity|list|set|put|post|proceed|trace|patch|Path|send|sendAsync|remove|delete|write|read|assignment|provider|exchange|postForEntity|call|createCall|createEndpoint|dispatch|invoke|newMessage|getInput|getOutput|getResponse|marshall|unmarshall|send|asyncSend|emit)

- key: apiIdentifier
value: (?i).*((hook|base|auth|prov|endp|install|cloud|host|request|service|gateway|route|resource|upload|api|worker)(.){0,12}url|(slack|web)(.){0,4}hook|(sentry|segment)(.){0,1}(dsn)|(rest|api|host|cloud|request|service)(.){0,4}(endpoint|gateway|route)).*
63 changes: 63 additions & 0 deletions rules/collections/android/any.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
collections:
- id: Collections.Android.Form.Email
name: Android Form Email
patterns:
- ".*(?i)email.*"
tags:
sourceId: Data.Sensitive.ContactData.EmailAddress

- id: Collections.Android.Form.User
name: Android Form User Account
patterns:
- ".*(?i)(user|login).*"
tags:
sourceId: Data.Sensitive.AccountData.AccountID

- id: Collections.Android.Form.OrderDetails
name: Android Form Order Details
patterns:
- "(?i).*((order|shipping|billing|invoice)(subscription|charge)?[^\\s/(;)#|,=!>]{0,5}(number|code|num|no|id))"
tags:
sourceId: Data.Sensitive.PurchaseData.OrderDetails

- id: Collections.Android.Form.FirstName
name: Android Form Personal Characterstics
patterns:
- "(?i).*((?:first|given)[^\\s/(;)#|,=!>]{0,5}|full)[_]?name"
tags:
sourceId: Data.Sensitive.PersonalIdentification.FirstName

- id: Collections.Android.Form.LastName
name: Android Form Personal Characterstics
patterns:
- "(?i).*((?:last|sur(?!geon))[^\\s/(;)#|,=!>]{0,5}name)"
tags:
sourceId: Data.Sensitive.PersonalIdentification.LastName

- id: Collections.Android.Form.Address
name: Android Form Address
patterns:
- ".*(?i)address.*"
tags:
sourceId: Data.Sensitive.ContactData.Address

- id: Collections.Android.Form.PhoneNumber
name: Android Form Phone Number
patterns:
- ".*(?i)phone.*"
tags:
sourceId: Data.Sensitive.ContactData.PhoneNumber

- id: Collections.Android.Form.ZipCode
name: Android Form Zip Code
patterns:
- ".*(?i)zip.*"
tags:
sourceId: Data.Sensitive.ContactData.Address

- id: Collections.Android.Form.Password
name: Android Form Password
patterns:
- ".*(?i)password.*"
tags:
sourceId: Data.Sensitive.AccountData.AccountPassword
2 changes: 1 addition & 1 deletion rules/collections/annotations/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ collections:
- id: Collections.Annotation.Spring
name: Spring Web Interface Annotation
patterns:
- "RequestMapping|PostMapping|PutMapping|GetMapping|DeleteMapping"
- "RequestMapping|PostMapping|PutMapping|PatchMapping|GetMapping|DeleteMapping"
tags:

- id: Collections.Annotation.Struts
Expand Down
2 changes: 1 addition & 1 deletion rules/collections/default/javascript.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ collections:
- id: Collections.Express
name: Express framework restendpoint
patterns:
- "express.(post|get|all|delete|put|patch|head|subscribe|unsubscribe)"
- "(?:express|fetch|@feathersjs/feathers|fastify|restify|@nestjs/cli|itty-router|koa-router|@ioc[:]Adonis|@adonisjs|@sails|sails|.*loopback|.*(?:socket[.](io|on|to).*)|(?:io[.]on.*(connection|leave-room|join-room))).*"
tags:
2 changes: 1 addition & 1 deletion rules/collections/webforms/any.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ collections:
- id: Collections.Webforms
name: Webform data collection
patterns:
- "^<(?i)(?:\\w{0,}(input|upload)\\w{0,}|\\w{0,}(textarea|Text|TextBox|Select|Field|Autocomplete|Checkbox))"
- "^<(?i)(?:\\w{0,}(input|upload)\\w{0,}|\\w{0,}(textarea|Text|TextBox|Select|Field|Autocomplete|Checkbox))[^>]*.*"
tags:
6 changes: 6 additions & 0 deletions rules/sinks/internal_apis/api/go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sinks:
- id: Sinks.API.InternalAPI
name: Internal APIs
patterns:
- "((http|https|ftp|ssh):\\/\\/){0,1}(((25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)\\.?\\b){4}|(localhost))(:[0-9]{2,4}){0,1}(\\/([a-z]){0,1}){0,1}.*"
tags:
6 changes: 6 additions & 0 deletions rules/sinks/internal_apis/api/ruby.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sinks:
- id: Sinks.API.InternalAPI
name: Internal APIs
patterns:
- "((http|https|ftp|ssh):\\/\\/){0,1}(((25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)\\.?\\b){4}|(localhost))(:[0-9]{2,4}){0,1}(\\/([a-z]){0,1}){0,1}.*"
tags:
Loading
Loading