Skip to content

Commit

Permalink
Convert model from QL to MaD
Browse files Browse the repository at this point in the history
  • Loading branch information
egregius313 committed Dec 13, 2024
1 parent f844105 commit 88256e2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions go/ql/lib/ext/os.model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ extensions:
pack: codeql/go-all
extensible: sourceModel
data:
- ["os", "", False, "Args", "", "", "", "commandargs", "manual"]
- ["os", "", False, "Environ", "", "", "ReturnValue", "environment", "manual"] # TODO: when sources can have access paths, use .ArrayElement
- ["os", "", False, "ExpandEnv", "", "", "ReturnValue", "environment", "manual"]
- ["os", "", False, "Getenv", "", "", "ReturnValue", "environment", "manual"]
Expand Down
6 changes: 0 additions & 6 deletions go/ql/lib/semmle/go/frameworks/stdlib/Os.qll
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,4 @@ module Os {
input = inp and output = outp
}
}

private class ArgsSource extends SourceNode {
ArgsSource() { exists(Variable v | v.hasQualifiedName("os", "Args") | this = v.getARead()) }

override string getThreatModel() { result = "commandargs" }
}
}

0 comments on commit 88256e2

Please sign in to comment.