Skip to content

Commit 48be5b2

Browse files
authored
Add echo framework support (#90)
* feat: add go-restful entrypoint collection support * feat: adapt go-restful v2 * fix: checker naming * refactor: migrate to typescript * fix: checker path suffix js -> ts * feat: go echo checker * feat: echo: refactor * chore: make gemini happy * chore: make sourcery happy * fix: add ruleConfig for echo.Context.Bind * style: format * feat: unified golang default import handling * fix: main-entrypoint-collect-checker * perf: reuse calculated fclos in processCallExpression
1 parent 9042156 commit 48be5b2

10 files changed

Lines changed: 544 additions & 31 deletions

File tree

build.sh

100755100644
File mode changed.

resource/checker/checker-config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@
146146
"checkerPath": "checker/taint/go/restful-entrypoint-collect-checker.ts",
147147
"description": "go-restful entrypoint采集以及框架source添加"
148148
},
149+
{
150+
"checkerId": "echo-entrypoint-collect-checker",
151+
"checkerPath": "checker/taint/go/echo-entrypoint-collect-checker.ts",
152+
"description": "echo entrypoint采集以及框架source添加"
153+
},
149154
{
150155
"checkerId": "get_file_ast",
151156
"checkerPath": "checker/sdk/get-file-ast-checker.ts",

resource/checker/checker-pack-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"taint_flow_go_input",
77
"cobra.Command-builtIn",
88
"go-restful-entryPoints-collect-checker",
9+
"echo-entrypoint-collect-checker",
910
"gorilla-mux-entrypoint-collect-checker",
1011
"gRpc-entryPoint-collect-checker",
1112
"go-main-entryPoints-collection",

resource/example-rule-config/rule_config_go.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,15 @@
468468
}
469469
],
470470
"FuncCallArgTaintSource": [
471+
{
472+
"args": [
473+
"0"
474+
],
475+
"calleeType": "echo.Context",
476+
"fsig": "Bind",
477+
"scopeFile": "all",
478+
"scopeFunc": "all"
479+
},
471480
{
472481
"args": [
473482
"0"

0 commit comments

Comments
 (0)