Skip to content

Commit

Permalink
[gosrc2cpg] - storage framework rules (#340)
Browse files Browse the repository at this point in the history
* added gorm rule

* fix gorm rule

* added more storage rules

* Added more framework rules

* dummy-commit
  • Loading branch information
ankit-privado authored Nov 1, 2023
1 parent ed48f2b commit 679d061
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 0 deletions.
17 changes: 17 additions & 0 deletions rules/sinks/storages/gorm/go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
sinks:

- id: Storages.GormFramework.Read
name: Gorm (Read)
domains:
- gorm.io
patterns:
- "(?i).*(github.com)(/)(go-gorm|jinzhu)(/)(gorm).*(Find).*"
tags:

- id: Storages.GormFramework.Write
name: Gorm (Write)
domains:
- gorm.io
patterns:
- "(?i).*(github.com)(/)(go-gorm|jinzhu)(/)(gorm).*(Create|Update|Delete|Save).*"
tags:
17 changes: 17 additions & 0 deletions rules/sinks/storages/gorp/go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
sinks:

- id: Storages.GorpFramework.Read
name: Gorp (Read)
domains:
- pkg.go.dev/github.com/go-gorp/gorp
patterns:
- "(?i).*(github.com|gopkg.in)(/)(gorp|go-gorp/gorp).*(Select).*"
tags:

- id: Storages.GormFramework.Write
name: Gorm (Write)
domains:
- pkg.go.dev/github.com/go-gorp/gorp
patterns:
- "(?i).*(github.com|gopkg.in)(/)(gorp|go-gorp/gorp).*(Insert|Update|Delete).*"
tags:
25 changes: 25 additions & 0 deletions rules/sinks/storages/pop/go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
sinks:

- id: Storages.PopFramework.Read
name: pop (Read)
domains:
- gobuffalo.io/documentation/database/pop/
patterns:
- "(?i).*(github.com)(/)(gobuffalo)(/)(pop).*(Find).*"
tags:

- id: Storages.PopFramework.Write
name: Xorm (Write)
domains:
- gobuffalo.io/documentation/database/pop/
patterns:
- "(?i).*(github.com)(/)(gobuffalo)(/)(pop).*(Create|Update|Destroy).*"
tags:

- id: Storages.PopFramework.ReadAndWrite
name: Xorm
domains:
- gobuffalo.io/documentation/database/pop/
patterns:
- "(?i).*(github.com)(/)(gobuffalo)(/)(pop).*(All).*"
tags:
17 changes: 17 additions & 0 deletions rules/sinks/storages/qbs/go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
sinks:

- id: Storages.QBSFramework.Read
name: Qbs (Read)
domains:
- doc.qt.io/qbs
patterns:
- "(?i).*(github.com|gopkg.in)(/)(coocood)(/)(qbs).*(Find).*"
tags:

- id: Storages.QBSFramework.Write
name: Qbs (Write)
domains:
- doc.qt.io/qbs
patterns:
- "(?i).*(github.com|gopkg.in)(/)(coocood)(/)(qbs).*(Save|Update|Delete).*"
tags:
25 changes: 25 additions & 0 deletions rules/sinks/storages/xorm/go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
sinks:

- id: Storages.XormFramework.Read
name: Xorm (Read)
domains:
- xorm.io
patterns:
- "(?i).*(github.com)(/)(go-xrom)(/)(xorm).*(Get|Find).*"
tags:

- id: Storages.XormFramework.Write
name: Xorm (Write)
domains:
- xorm.io
patterns:
- "(?i).*(github.com)(/)(go-xrom)(/)(xorm).*(Insert|Update|Delete).*"
tags:

- id: Storages.XormFramework.ReadAndWrite
name: Xorm
domains:
- xorm.io
patterns:
- "(?i).*(github.com)(/)(go-xrom)(/)(xorm).*(Exec).*"
tags:

0 comments on commit 679d061

Please sign in to comment.