Skip to content

Commit

Permalink
api config rule for JS (Privado-Inc#235)
Browse files Browse the repository at this point in the history
* api config rule for JS

* Add apiHttpLibraries & apiIdentifier

---------

Co-authored-by: Dattaprasad Mundada <[email protected]>
  • Loading branch information
khemrajrathore and dbMundada authored May 3, 2023
1 parent 1466b05 commit 7a2b8d5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config/systemConfig/javascript.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
systemConfig:
- key: apiHttpLibraries
value: (?i)(request|fetch|axios|urllib|http|client|socketio|xmlhttprequest|got|apollo|superagent|wretch|.*(HttpClient)).*

- 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|cloud|host|request|service|gateway|route|resource|upload)(.){0,12}url|(slack|web)(.){0,4}hook|(rest|api|host|cloud|request|service)(.){0,4}(endpoint|gateway|route)).*

0 comments on commit 7a2b8d5

Please sign in to comment.