Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2539 commits
Select commit Hold shift + click to select a range
08c10bf
Merge pull request #625 from smowton/smowton/fix/minor-perf-improvements
smowton Dec 13, 2021
559aec1
Merge pull request #632 from owen-mc/refactor-variadic-helper-functio…
smowton Dec 13, 2021
89b2a2f
Merge pull request #633 from owen-mc/database-sql-model-incorrect
smowton Dec 13, 2021
9309abf
Merge pull request #574 from sauyon/dataflow-update
smowton Dec 13, 2021
6a2a829
Add missing tests for DatabaseSql function models
owen-mc Dec 13, 2021
c2b42ce
Fix sanitization by strings.Replace[All] in go/unsafe-quoting and go/…
smowton Dec 14, 2021
f86510e
Update comment
smowton Dec 14, 2021
bd806a8
Merge pull request #638 from owen-mc/test-database-sql-models
smowton Dec 14, 2021
42ecc9b
Move new change notes to appropriate pack
Dec 14, 2021
a3e5b4c
Move pre-packaging change notes to `old-change-notes` directory
Dec 14, 2021
d14ea51
Merge pull request #639 from github/dbartol/fix-change-notes
Dec 14, 2021
ee6ea0f
Release preparation for version 2.7.4
invalid-email-address Dec 14, 2021
e1417f1
Merge pull request #640 from github/release-prep/2.7.4
Dec 14, 2021
9de1532
Add log-injection test using strings.ReplaceAll
smowton Dec 15, 2021
f510844
Update change-notes/2021-12-14-strings-replace-sanitizers.md
smowton Dec 15, 2021
ede57b6
Merge pull request #637 from smowton/smowton/fix/log-injection-saniti…
smowton Dec 16, 2021
9b2f29b
Allow data flow through receiver for modelled methods
owen-mc Dec 13, 2021
ec3dd1e
Revert "Update tests for no flow through receivers when no function b…
owen-mc Dec 15, 2021
da8f8e2
Refactor to use SummarizedCallable, sourceElement and sinkElement
owen-mc Dec 15, 2021
92d3da5
Declassify fmt.Fprintf as a log sink
smowton Dec 17, 2021
4459c8e
run the redundant-cast patch
erik-krogh Dec 20, 2021
d339f13
run the non-us-language patch
erik-krogh Dec 20, 2021
afe7ee1
run the use-set-literals patch
erik-krogh Dec 20, 2021
00aae7c
Post-release version bumps
invalid-email-address Jan 3, 2022
091906d
Merge pull request #644 from github/post-release-prep/codeql-cli-2.7.4
Jan 3, 2022
171aa8b
Move change notes to proper location
Jan 3, 2022
50457d1
Merge pull request #653 from dbartol/dbartol/move-change-notes
hvitved Jan 4, 2022
daa55ea
Merge pull request #651 from erik-krogh/patches
owen-mc Jan 4, 2022
980c162
Release preparation for version 2.7.5
invalid-email-address Jan 4, 2022
a0766e0
Merge pull request #656 from github/release-prep/2.7.5
hvitved Jan 4, 2022
49d239f
Push upgrades pack into lib pack
aeisenberg Dec 10, 2021
5760841
Merge pull request #647 from smowton/smowton/admin/not-all-you-fmt-is…
smowton Jan 5, 2022
7496987
Note that the %q format directive escapes newlines, and therefore pre…
smowton Jan 5, 2022
e0a3ec8
Path transformer: use fully resolved path
smowton Jan 5, 2022
6b4a505
Merge pull request #659 from smowton/smowton/fix/path-transformer-use…
smowton Jan 6, 2022
ae5eade
Update ql/lib/semmle/go/frameworks/stdlib/Log.qll
smowton Jan 10, 2022
6f598a6
Fix formatting regex comment
smowton Jan 10, 2022
6afd570
Merge pull request #658 from smowton/smowton/feature/q-format-directi…
smowton Jan 11, 2022
6ceebc7
Merge branch 'main' into aeisenberg/upgrades/work
aeisenberg Jan 11, 2022
2b8e4b2
Merge pull request #628 from github/aeisenberg/upgrades/work
aeisenberg Jan 11, 2022
970e8e1
Post-release preparation for codeql-cli-2.7.5
invalid-email-address Jan 12, 2022
8a4120a
Changenotes: Add changenotes for upgrades refactoring
aeisenberg Jan 12, 2022
c86e96b
Merge branch 'main' into post-release-prep/codeql-cli-2.7.5
aeisenberg Jan 14, 2022
156588a
Update change note
aeisenberg Jan 14, 2022
a83af5e
Merge pull request #661 from github/aeisenberg/changenote-upgrades-re…
aeisenberg Jan 14, 2022
429a965
Merge pull request #657 from github/post-release-prep/codeql-cli-2.7.5
hvitved Jan 17, 2022
fd1136a
Add change note for change to `Function.getACall`
owen-mc Jan 18, 2022
84116e1
Update ql/lib/change-notes/2022-01-18-function-get-a-call.md
owen-mc Jan 18, 2022
1aebf4c
Merge pull request #664 from owen-mc/add-change-note-function-getacall
owen-mc Jan 18, 2022
3c02403
Do not use getACall() when we only want direct calls
owen-mc Jan 18, 2022
84f9b74
t Improve documentation of `Function.getACall`
owen-mc Jan 18, 2022
85319b2
Add tests for tainted path sanitizers and sanitizer guards
owen-mc Jan 19, 2022
7fd2fff
Merge pull request #666 from owen-mc/tainted-path-add-more-tests
owen-mc Jan 19, 2022
4d1dcb3
Remove first disjunct as it is a subset of second disjunct
owen-mc Jan 19, 2022
7f39b1e
Don't use codeql pack install --verify
smowton Jan 19, 2022
5a2a15c
Merge pull request #668 from github/smowton/fix/no-pack-install-verify
smowton Jan 19, 2022
bfae3fd
Merge pull request #665 from owen-mc/update-function-get-a-call
owen-mc Jan 19, 2022
1e5721b
Release preparation for version 2.7.6
invalid-email-address Jan 20, 2022
8c00d3e
Merge pull request #669 from github/release-prep/2.7.6
hvitved Jan 20, 2022
8111fbb
Delete m
smowton Jan 20, 2022
de07035
Merge pull request #670 from github/smowton/admin/remove-committed-bi…
smowton Jan 20, 2022
5485511
Correct module name in file comment
owen-mc Jan 25, 2021
c52caa6
Post-release preparation for codeql-cli-2.7.6
invalid-email-address Jan 20, 2022
691bb97
Move ReturnValue[]-specific code to non-shared file
owen-mc Jan 13, 2022
44641de
Represent ReturnValue[n] correctly in test output
owen-mc Jan 13, 2022
3804839
Merge pull request #671 from owen-mc/misc-clean-ups
smowton Jan 20, 2022
99994ee
use set literals instead of big disjunctions
erik-krogh Jan 20, 2022
504e7a1
simplify an redundant any() expression
erik-krogh Jan 20, 2022
d6d1c94
Merge pull request #674 from erik-krogh/patches
smowton Jan 21, 2022
daabd3a
Merge pull request #673 from owen-mc/refactor-returnvalue-n
owen-mc Jan 24, 2022
6a2f471
Merge pull request #672 from github/post-release-prep/codeql-cli-2.7.6
hvitved Jan 24, 2022
cc7b72a
Merge branch `rc/3.4` into `main`
edoardopirovano Jan 25, 2022
4a3e945
Merge pull request #676 from github/edoardo/3.4-mergeback
edoardopirovano Jan 25, 2022
9e0580d
Add new groups for examples packs
aeisenberg Jan 24, 2022
d545716
Release preparation for version 2.8.0
invalid-email-address Jan 27, 2022
14d227a
Merge pull request #677 from github/release-prep/2.8.0
tamasvajk Jan 27, 2022
28461f5
Merge pull request #675 from github/aeisenberg/examples-groups
aeisenberg Jan 27, 2022
de2ed83
Note that `filepath.Clean("/" + e)` is a sanitizer against path trave…
smowton Jan 28, 2022
d064b17
Merge pull request #678 from smowton/smowton/feature/note-filepath-cl…
smowton Jan 31, 2022
613a85b
Add ErrorExpr to dbscheme
owen-mc Feb 1, 2022
ee85d6c
Undo whitespace change
smowton Feb 1, 2022
f351924
Merge pull request #679 from owen-mc/add-error-expr-to-dbscheme
owen-mc Feb 1, 2022
4a4b9c3
Add an example query for inexhaustive switches
rneatherway Feb 2, 2022
e3feece
Merge pull request #680 from github/rneatherway/example-query
rneatherway Feb 2, 2022
dea1959
Match gopkg.in import of squirrel for SQLi query
lyoung-confluent Feb 3, 2022
3b32425
remove .v1 from gopkg.in
lyoung-confluent Feb 4, 2022
324f8f7
codeql query format
lyoung-confluent Feb 7, 2022
034f3d5
Merge pull request #683 from lyoung-confluent/patch-2
owen-mc Feb 8, 2022
c547f47
CI: Run on Windows 2019
smowton Feb 9, 2022
85db49c
Merge pull request #685 from github/smowton/fix/windows-2019-ci
owen-mc Feb 9, 2022
9c12f1a
Release preparation for version 2.8.0
invalid-email-address Jan 27, 2022
b3d63ac
Post-release preparation for codeql-cli-2.8.0
invalid-email-address Feb 6, 2022
92862fa
Merge pull request #684 from github/post-release-prep/codeql-cli-2.8.0
tamasvajk Feb 9, 2022
29391a1
Merge branch 'main' into codeql-cli-2.8.0-copy
tamasvajk Feb 9, 2022
b51b606
Merge pull request #689 from github/codeql-cli-2.8.0-copy
smowton Feb 9, 2022
f66cad8
Go: sync FlowSummaryImpl.qll
asgerf Feb 10, 2022
6d4b4df
Go: auto format
asgerf Feb 10, 2022
9b61ed9
Add query "Wrapped error always nil"
owen-mc Feb 1, 2022
98c60f3
Simplify comparison of DataFlow::Node and IR::Instruction
owen-mc Feb 3, 2022
4ba4b5a
Add query help for WrappedErrorAlwaysNil
rneatherway Feb 9, 2022
a008bd4
Add a change note
owen-mc Feb 10, 2022
3173765
Minor changes to qhelp
owen-mc Feb 10, 2022
6f0e1a2
Release preparation for version 2.8.1
invalid-email-address Feb 10, 2022
a26bfb0
Go: add test with Argument[0..2] spec
asgerf Feb 11, 2022
66545db
Go: fix parsing of n1..n2 in parseConstantOrRange
asgerf Feb 11, 2022
6bfc0a7
Go: use parseConstantOrRange in parseReturn
asgerf Feb 11, 2022
6403a23
Merge pull request #693 from github/release-prep/2.8.1
aibaars Feb 11, 2022
620bdf2
Go: add new sink to completetest.ql as well
asgerf Feb 11, 2022
fbd73a3
Merge pull request #690 from asgerf/asgerf/sync-flow-summary-impl
owen-mc Feb 11, 2022
a89ae0b
Post-release preparation for codeql-cli-2.8.1
invalid-email-address Feb 11, 2022
0f15d71
Merge pull request #694 from github/post-release-prep/codeql-cli-2.8.1
aibaars Feb 15, 2022
e8c2ab7
Apply suggestions from code review from docs team
owen-mc Feb 21, 2022
da52cb2
Go: sync FlowSummaryImpl and AccessPathSyntax.qll
asgerf Feb 21, 2022
846a876
Go: update to use new API exposed by FlowSummaryImpl.qll
asgerf Feb 21, 2022
cb38df5
Go: rewrite access paths to dot-style
asgerf Feb 21, 2022
0cd5e52
Update expected alert message
owen-mc Feb 22, 2022
980c274
Merge pull request #681 from owen-mc/new-query/wrapped-error-always-nil
owen-mc Feb 22, 2022
106ee5b
Merge pull request #696 from asgerf/asgerf/dot-separated-access-paths
smowton Feb 22, 2022
28c3c00
Move new query change note to src pack
smowton Feb 24, 2022
60bd464
Re-add change note to src pack
smowton Feb 24, 2022
b1cdde6
Merge pull request #697 from github/smowton/admin/move-change-note
smowton Feb 24, 2022
3840ce8
Release preparation for version 2.8.2
invalid-email-address Feb 24, 2022
8d329c5
Fix typo in change logs
tamasvajk Feb 24, 2022
3125f49
Merge pull request #698 from github/release-prep/2.8.2
tamasvajk Feb 24, 2022
dd3fc2d
Post-release preparation for codeql-cli-2.8.2
invalid-email-address Mar 1, 2022
30c8062
Merge pull request #699 from github/post-release-prep/codeql-cli-2.8.2
tamasvajk Mar 1, 2022
e808423
Treat path.Clean and filepath.Clean alike re: tainted path sanitization
smowton Mar 8, 2022
807ef2e
Merge pull request #700 from smowton/smowton/fix/filepath-clean
owen-mc Mar 9, 2022
e7cf172
Release preparation for version 2.8.3
invalid-email-address Mar 10, 2022
77b879f
Merge pull request #701 from github/release-prep/2.8.3
aibaars Mar 11, 2022
4bd2553
Post-release preparation for codeql-cli-2.8.3
invalid-email-address Mar 11, 2022
be412b1
Merge pull request #702 from github/post-release-prep/codeql-cli-2.8.3
aibaars Mar 14, 2022
b96eba9
Release preparation for version 2.8.4
invalid-email-address Mar 21, 2022
30bd1a6
Merge pull request #704 from github/release-prep/2.8.4
igfoo Mar 21, 2022
9ba2192
Post-release preparation for codeql-cli-2.8.4
invalid-email-address Mar 21, 2022
8a3a58c
Delete unused file DataFlowImplConsistency
owen-mc Mar 30, 2022
79e6f78
Merge pull request #710 from owen-mc/delete-consistency
owen-mc Mar 30, 2022
e9acb4f
Merge pull request #706 from github/post-release-prep/codeql-cli-2.8.4
igfoo Mar 30, 2022
9b6dd60
Address incorrectly reference parameter in QLdoc
rverme Apr 1, 2022
314bd20
Merge pull request #711 from rverme/patch-1
smowton Apr 1, 2022
950519c
Release preparation for version 2.8.5
invalid-email-address Apr 1, 2022
837d1fb
Merge pull request #712 from github/release-prep/2.8.5
igfoo Apr 1, 2022
469af4c
Post-release preparation for codeql-cli-2.8.5
invalid-email-address Apr 1, 2022
603c1d5
Extend DataFlowCallable to include file scopes
owen-mc Apr 5, 2022
880afea
Pretty-print empty interface without double space
owen-mc Apr 8, 2022
76a0a51
Merge pull request #715 from owen-mc/print-empty-interface-with-singl…
owen-mc Apr 8, 2022
6f6e8bf
Merge pull request #713 from github/post-release-prep/codeql-cli-2.8.5
igfoo Apr 8, 2022
b9ff1cc
Add change note
owen-mc Apr 8, 2022
16c0f11
Bump minor version of packs
edoardopirovano Apr 8, 2022
f196538
Merge pull request #714 from owen-mc/fix-get-enclosing-callable
owen-mc Apr 8, 2022
49e568e
Bump version of `suite-helpers` dependency
Apr 8, 2022
e3b7ba6
Revert "Bump version of `suite-helpers` dependency"
Apr 8, 2022
b953fe3
Merge pull request #716 from github/edoardo/3.5-mergeback
edoardopirovano Apr 8, 2022
f9f21e9
Integer conversion should ignore type assertions
owen-mc Apr 12, 2022
a8eeef6
Merge pull request #718 from owen-mc/fix-incorrect-integer-conversion…
smowton Apr 12, 2022
b6702b6
Improve documentation of CallExpr.getCalleeName
owen-mc Apr 14, 2022
528a735
Improve CallNode.getCalleeName
owen-mc Apr 21, 2022
373017a
Add tests for callees through function variables
owen-mc Apr 13, 2022
69c9099
Look for callees through function variables
owen-mc Apr 13, 2022
62489e1
Fix viableCallable for function variables
owen-mc Apr 21, 2022
5f3b913
Add change note
owen-mc Apr 14, 2022
355f4c6
Release preparation for version 2.9.0
invalid-email-address Apr 21, 2022
6f91cc1
Merge pull request #719 from owen-mc/bugfix/find-callee-through-funct…
owen-mc Apr 21, 2022
d2d92fa
Merge pull request #723 from github/release-prep/2.9.0
MathiasVP Apr 21, 2022
59cc289
Post-release preparation for codeql-cli-2.9.0
invalid-email-address Apr 21, 2022
b8165d4
Merge pull request #724 from github/post-release-prep/codeql-cli-2.9.0
MathiasVP Apr 25, 2022
bcd2c00
Release preparation for version 2.9.1
invalid-email-address Apr 28, 2022
ff677cd
Merge pull request #726 from github/release-prep/2.9.1
MathiasVP Apr 28, 2022
d2fccbe
Fix Beego references
cklin Apr 28, 2022
ee94eb5
Merge pull request #727 from cklin/fix-ql-comments-syntax
owen-mc Apr 29, 2022
22ccbba
Run `go mod tidy -e` if go.mod exists
owen-mc May 3, 2022
570d3f4
Use `os.Stat` instead of `os.File.Stat`
owen-mc May 4, 2022
fea657c
Post-release preparation for codeql-cli-2.9.1
invalid-email-address May 5, 2022
ef7363c
Merge pull request #732 from github/post-release-prep/codeql-cli-2.9.1
MathiasVP May 6, 2022
7f0a379
Use Go 1.18
owen-mc Jan 27, 2022
f7dcb11
Extract uninstantiated generic types only
owen-mc Feb 21, 2022
3952b1c
Extract type parameter types (and update dbscheme)
owen-mc Jan 27, 2022
b8ab46d
Add QL class for type parameter types
owen-mc Feb 9, 2022
e84db95
Extract generic function instantiations to new table
owen-mc Jan 27, 2022
a05a525
Extract generic type instantiations to new table
owen-mc Feb 15, 2022
3510f2c
Support non-basic interfaces in extractor
owen-mc Mar 29, 2022
1e08201
Extract type param declarations
owen-mc Mar 29, 2022
f908a6f
Rename `parm` to `param` for clarity
owen-mc Mar 17, 2022
982f11f
Make ScopedObjectID take a function
owen-mc Mar 31, 2022
213fa1f
Break out of loop when a match has been found
owen-mc Mar 31, 2022
92c3314
Extract type parameters in types, not just decls
owen-mc Mar 29, 2022
63d1663
bug fix: label pointer-typed receivers correctly
owen-mc Mar 31, 2022
4d9937d
Add tests
owen-mc Feb 15, 2022
0194eb9
Add an upgrade and downgrade script
owen-mc Apr 1, 2022
1da5399
Fix obvious test failures
owen-mc Apr 1, 2022
4fa972f
Rename variable for clarity
owen-mc Apr 4, 2022
4828430
Extract all object types before emitting them
owen-mc Apr 4, 2022
9abc7ea
Address review comments 1
owen-mc Apr 4, 2022
59aa742
Add comments about entities without a parent scope
owen-mc Apr 6, 2022
253ca2b
Address review comments 2
owen-mc Apr 7, 2022
8276ca0
Use generic method not instantiated one in Uses
owen-mc Apr 7, 2022
8c15199
Use generic struct field not instantiated one in Uses
owen-mc Apr 8, 2022
25b91d8
Update tests
owen-mc Apr 8, 2022
4e71ab5
Update comment above first extraction of packages
owen-mc Apr 8, 2022
7a7ca61
Add data flow tests for generic structs, methods and functions
owen-mc Apr 11, 2022
ce9c9cf
`CallExpr.getCalleeExpr` should get uninstantiated function
owen-mc Apr 11, 2022
26d4acd
generic function instantions aren't type exprs
owen-mc Apr 11, 2022
5257c4a
Add control flow test
owen-mc Apr 12, 2022
20562cb
Add missing `this.` to member predicate calls
owen-mc Apr 12, 2022
a8a351f
Improve comment
owen-mc Apr 12, 2022
0dee215
Update CodeQL tests to go 1.18.1
owen-mc Apr 13, 2022
3790c4e
Control flow for generic function instantiations
owen-mc Apr 13, 2022
4a9aeac
Find callee through function instantiation
owen-mc Apr 13, 2022
ba147e8
Test calls through variables
owen-mc Apr 21, 2022
2e8b9a9
Fix extractor crash when missing type information
owen-mc Apr 25, 2022
06d1398
Fix panic when type is unknown
owen-mc Apr 26, 2022
aa62fab
Fix another place where type could be nil
owen-mc Apr 26, 2022
7f1f428
Remove invalid code in test
owen-mc Apr 27, 2022
8477053
Test calling generic functions from other files
owen-mc Apr 27, 2022
ac081dc
Make TypeParamParent map global
owen-mc Apr 27, 2022
d098bdc
Reintroduce noinlined predicate to fix performance
owen-mc Apr 29, 2022
3c4b520
Fix type aliases for instantiated generic types
owen-mc May 3, 2022
d330033
Make objects-map-changed warning non-fatal
smowton May 10, 2022
3129c3d
Remove commented-out debug code
smowton May 10, 2022
c0fbd03
Add qldoc for `getTermInIntersection`
smowton May 10, 2022
2b51b42
fix https://github.com/github/codeql/issues/9097
May 11, 2022
440b311
Merge pull request #686 from owen-mc/extract-generics
smowton May 11, 2022
7530943
Add change note announcing generics support
smowton May 11, 2022
72022e6
Copyedit
smowton May 11, 2022
d9e7d34
Merge pull request #735 from github/smowton/admin/generics-change-note
smowton May 11, 2022
c703580
update fix
May 12, 2022
ebcb040
update fix
May 12, 2022
edbd5dd
Release preparation for version 2.9.2
invalid-email-address May 12, 2022
3423729
Merge pull request #736 from github/release-prep/2.9.2
MathiasVP May 12, 2022
e68a727
Drop redundant columns from `files` and `folders` relations in `xml.d…
hvitved May 12, 2022
11c95c5
Post-release preparation for codeql-cli-2.9.2
invalid-email-address May 12, 2022
211580e
Merge pull request #738 from hvitved/xml-dbscheme-files-folders
smowton May 13, 2022
252b190
Merge branch 'github:main' into main
cokeBeer May 13, 2022
808dde2
add v2modulePath()
May 13, 2022
75f2edd
add v2modulePath()
May 13, 2022
aa2d445
add v1modulePath()
May 13, 2022
7f21c0c
fix format
May 13, 2022
2930bd4
Only attempt go.mod updating if go >= 1.16
smowton May 13, 2022
32e2949
Merge pull request #734 from cokeBeer/main
smowton May 13, 2022
77461f7
Merge pull request #730 from owen-mc/bugfix/build/go-mod-tidy
smowton May 13, 2022
0b0161f
Merge pull request #737 from github/post-release-prep/codeql-cli-2.9.2
MathiasVP May 17, 2022
3b4d04d
Update Lua tracing config.
criemen May 17, 2022
415c3d1
Merge pull request #740 from github/criemen/lua-tracing-config
criemen May 17, 2022
aa514ff
codeql-go merge prep: move into go/ directory
cklin May 20, 2022
097d518
Merge branch 'main' into cklin/merge-codeql-go-prep
cklin May 20, 2022
1276c41
codeql-go merge prep: integrate go/ into codeql
cklin Apr 26, 2022
c58b539
Go: delete test qhelp file
cklin Apr 4, 2022
7bc6c10
Go: fix search-path for 'make test'
aibaars Mar 28, 2022
827c7ab
Go: fix search and tool paths for 'make test'
cklin Mar 28, 2022
7f96319
Clean up direct references to codeql-go
cklin Apr 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .codeqlmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"*/ql/examples/qlpack.yml",
"*/ql/consistency-queries/qlpack.yml",
"cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/qlpack.yml",
"go/ql/config/legacy-support/qlpack.yml",
"go/build/codeql-extractor-go/codeql-extractor.yml",
"javascript/ql/experimental/adaptivethreatmodeling/lib/qlpack.yml",
"javascript/ql/experimental/adaptivethreatmodeling/modelbuilding/qlpack.yml",
"javascript/ql/experimental/adaptivethreatmodeling/src/qlpack.yml",
Expand Down
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
*.py text
*.lua text
*.expected text
*.go text

# Explicitly set a bunch of known extensions to binary, because Git < 2.10 will treat
# `* text=auto eol=lf` as `* text eol=lf`
Expand All @@ -52,6 +53,14 @@
java/ql/test/stubs/**/*.java linguist-generated=true
java/ql/test/experimental/stubs/**/*.java linguist-generated=true

# Force git not to modify line endings for go or html files under the go/ql directory
go/ql/**/*.go -text
go/ql/**/*.html -text
# Force git not to modify line endings for go dbschemes
go/*.dbscheme -text
# Preserve unusual line ending from codeql-go merge
go/extractor/opencsv/CSVReader.java -text

# For some languages, upgrade script testing references really old dbscheme
# files from legacy upgrades that have CRLF line endings. Since upgrade
# resolution relies on object hashes, we must suppress line ending conversion
Expand Down
14 changes: 14 additions & 0 deletions .github/problem-matchers/codeql-query-format.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"problemMatcher": [
{
"owner": "codeql-query-format",
"pattern": [
{
"regexp": "^((.*) would change by autoformatting\\.)$",
"file": 2,
"message": 1
}
]
}
]
}
17 changes: 17 additions & 0 deletions .github/problem-matchers/codeql-syntax-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "codeql-syntax-check",
"pattern": [
{
"regexp": "^((ERROR|WARNING): .* \\((.*):(\\d+),(\\d+)-\\d+\\))$",
"message": 1,
"file": 3,
"line": 4,
"col": 5,
"severity": 2
}
]
}
]
}
14 changes: 14 additions & 0 deletions .github/problem-matchers/codeql-test-run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"problemMatcher": [
{
"owner": "codeql-test-run",
"pattern": [
{
"regexp": "(\\[.*\\] FAILED\\((RESULT|COMPILATION)\\) (.*))$",
"file": 3,
"message": 1
}
]
}
]
}
13 changes: 13 additions & 0 deletions .github/problem-matchers/make.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"problemMatcher": [
{
"owner": "make",
"pattern": [
{
"regexp": "^(make: \\*\\*\\* .*)$",
"message": 1
}
]
}
]
}
157 changes: 157 additions & 0 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
name: "Go: Run Tests"
on: [pull_request]
jobs:

test-linux:
name: Test Linux (Ubuntu)
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.18.1
uses: actions/setup-go@v1
with:
go-version: 1.18.1
id: go

- name: Set up CodeQL CLI
run: |
echo "Removing old CodeQL Directory..."
rm -rf $HOME/codeql
echo "Done"
cd $HOME
echo "Downloading CodeQL CLI..."
LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | sort --version-sort | grep -v beta | tail -1)
gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip "$LATEST"
echo "Done"
echo "Unpacking CodeQL CLI..."
unzip -q codeql-linux64.zip
rm -f codeql-linux64.zip
echo "Done"
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Check out code
uses: actions/checkout@v2

- name: Enable problem matchers in repository
shell: bash
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'

- name: Build
run: |
cd go
env PATH=$PATH:$HOME/codeql make

- name: Check that all QL and Go code is autoformatted
run: |
cd go
env PATH=$PATH:$HOME/codeql make check-formatting

- name: Compile qhelp files to markdown
run: |
cd go
env PATH=$PATH:$HOME/codeql QHELP_OUT_DIR=qhelp-out make qhelp-to-markdown

- name: Upload qhelp markdown
uses: actions/upload-artifact@v2
with:
name: qhelp-markdown
path: go/qhelp-out/**/*.md

- name: Test
run: |
cd go
env PATH=$PATH:$HOME/codeql make test

test-mac:
name: Test MacOS
runs-on: macOS-latest
steps:
- name: Set up Go 1.18.1
uses: actions/setup-go@v1
with:
go-version: 1.18.1
id: go

- name: Set up CodeQL CLI
run: |
echo "Removing old CodeQL Directory..."
rm -rf $HOME/codeql
echo "Done"
cd $HOME
echo "Downloading CodeQL CLI..."
LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | sort --version-sort | grep -v beta | tail -1)
gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-osx64.zip "$LATEST"
echo "Done"
echo "Unpacking CodeQL CLI..."
unzip -q codeql-osx64.zip
rm -f codeql-osx64.zip
echo "Done"
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Check out code
uses: actions/checkout@v2

- name: Enable problem matchers in repository
shell: bash
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'

- name: Build
run: |
cd go
env PATH=$PATH:$HOME/codeql make

- name: Test
run: |
cd go
env PATH=$PATH:$HOME/codeql make test

test-win:
name: Test Windows
runs-on: windows-2019
steps:
- name: Set up Go 1.18.1
uses: actions/setup-go@v1
with:
go-version: 1.18.1
id: go

- name: Set up CodeQL CLI
run: |
echo "Removing old CodeQL Directory..."
rm -rf $HOME/codeql
echo "Done"
cd "$HOME"
echo "Downloading CodeQL CLI..."
LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | sort --version-sort | grep -v beta | tail -1)
gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-win64.zip "$LATEST"
echo "Done"
echo "Unpacking CodeQL CLI..."
unzip -q -o codeql-win64.zip
unzip -q -o codeql-win64.zip codeql/codeql.exe
rm -f codeql-win64.zip
echo "Done"
env:
GITHUB_TOKEN: ${{ github.token }}
shell:
bash

- name: Check out code
uses: actions/checkout@v2

- name: Enable problem matchers in repository
shell: bash
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'

- name: Build
run: |
$Env:Path += ";$HOME\codeql"
cd go
make

- name: Test
run: |
$Env:Path += ";$HOME\codeql"
cd go
make test
2 changes: 1 addition & 1 deletion .github/workflows/ql-for-ql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
folder: [cpp, csharp, java, javascript, python, ql, ruby, swift]
folder: [cpp, csharp, java, javascript, python, ql, ruby, swift, go]

needs:
- package
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ql-for-ql-dataset_measure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
matrix:
repo:
- github/codeql
- github/codeql-go
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# qltest projects and artifacts
*/ql/test/**/*.testproj
*/ql/test/**/*.actual
*/ql/test/**/go.sum

# Visual studio temporaries, except a file used by QL4VS
.vs/*
Expand Down Expand Up @@ -42,3 +43,15 @@ csharp/extractor/Semmle.Extraction.CSharp.Driver/Properties/launchSettings.json

# CLion project files
/.clwb

# Go build artifacts
go/build/*

# Go binaries
go/tools/bin
go/tools/linux64
go/tools/osx64
go/tools/win64
go/tools/tokenizer.jar
go/main

4 changes: 4 additions & 0 deletions .lgtm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ path_classifiers:
test:
- csharp/ql/src
- csharp/ql/test
- go/ql/test
- javascript/extractor/parser-tests
- javascript/extractor/tests
- javascript/ql/src
- javascript/ql/test
- python/ql/src
- python/ql/test

example:
- go/ql/src

Comment on lines +17 to +19
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do? And why does it only exist for go?

Copy link
Copy Markdown
Contributor

@aibaars aibaars Apr 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a config file for https://lgtm.com/projects/g/github/codeql . These lines classify all Go source code in go/ql/src as example code so LGTM will filter out any results in QHelp samples .

See also: https://lgtm.com/projects/g/github/codeql-go/latest/files/?sort=name&dir=ASC&mode=heatmap&showExcluded=true and toggle the show excluded files filter.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't other languages have a similar entry?

queries:
- include: "*"

Expand Down
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/cpp/ @github/codeql-c-analysis
/csharp/ @github/codeql-csharp
/go/ @github/codeql-go
Comment thread
owen-mc marked this conversation as resolved.
/java/ @github/codeql-java
/javascript/ @github/codeql-javascript
/python/ @github/codeql-python
Expand Down
76 changes: 76 additions & 0 deletions go/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at opensource@github.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct/

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq/
Loading