Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2.1k
Go: Update to 1.26#21150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Go: Update to 1.26 #21150
Changes from all commits
e00e3a850ed0af22e9b42700543b26ef33222e9c21e1bddd9936c4ccf01d584542d463File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| --- | ||
| category: majorAnalysis | ||
| --- | ||
| * Go 1.26 is now supported. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| module semmle.go.Packages | ||
| go 1.13 | ||
| go 1.26 | ||
| require github.com/nonexistent/test v0.0.0-20200203000000-0000000000000 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| module semmle.go.Packages | ||
| go 1.21 | ||
| go 1.26 | ||
| require github.com/nonexistent/test v0.0.0-20200203000000-0000000000000 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| package main | ||
| // Also tested in go/ql/test/library-tests/semmle/go/dataflow/ExternalValueFlow | ||
| // and go/ql/test/library-tests/semmle/go/dataflow/ExternalTaintFlow. | ||
| func TaintStepTest_Append1(sourceCQL interface{}) interface{} { | ||
| from := sourceCQL.([]byte) | ||
| var intoInterface interface{} | ||
| intoInterface = append(from, "a string"...) | ||
| return intoInterface | ||
| } | ||
| func TaintStepTest_Append2(sourceCQL interface{}) interface{} { | ||
| from := sourceCQL.(int) | ||
| slice := []int{from} | ||
| var intoInterface []int | ||
| intoInterface = append(slice, 0) | ||
| return intoInterface[0] | ||
| } | ||
| func TaintStepTest_Append3(sourceCQL interface{}) interface{} { | ||
| from := sourceCQL.(string) | ||
| var intoInterface interface{} | ||
| intoInterface = append([]byte{}, from...) | ||
| return intoInterface | ||
| } | ||
| func TaintStepTest_Append4(sourceCQL interface{}) interface{} { | ||
| from := sourceCQL.(int) | ||
| var intoInterface []int | ||
| intoInterface = append([]int{}, 0, from, 1) | ||
| return intoInterface[0] | ||
| } | ||
| func TaintStepTest_Copy1(sourceCQL interface{}) interface{} { | ||
| from := sourceCQL.(string) | ||
| var intoInterface []byte | ||
| copy(intoInterface, from) | ||
| return intoInterface | ||
| } | ||
| func TaintStepTest_Copy2(sourceCQL interface{}) interface{} { | ||
| from := []int{sourceCQL.(int)} | ||
| var intoInterface []int | ||
| copy(intoInterface, from) | ||
| return intoInterface[0] | ||
| } | ||
| func TaintStepTest_Max(sourceCQL interface{}) interface{} { | ||
| from := sourceCQL.(int) | ||
| var intoInterface int | ||
| intoInterface = max(0, 1, from, 2, 3) | ||
| return intoInterface | ||
| } | ||
| func TaintStepTest_Min(sourceCQL interface{}) interface{} { | ||
| from := sourceCQL.(int) | ||
| var intoInterface int | ||
| intoInterface = min(0, 1, from, 2, 3) | ||
| return intoInterface | ||
| } | ||
| func TaintStepTest_New(sourceCQL interface{}) interface{} { | ||
| from := sourceCQL.(int) | ||
| var intoInterface *int | ||
| intoInterface = new(from) | ||
| return *intoInterface | ||
| } | ||
| func RunAllTaints_Builtin() { | ||
| { | ||
| source := newSource(0) | ||
| out := TaintStepTest_Append1(source) | ||
| sink(0, out) | ||
| } | ||
| { | ||
| source := newSource(1) | ||
| out := TaintStepTest_Append2(source) | ||
| sink(1, out) | ||
| } | ||
| { | ||
| source := newSource(2) | ||
| out := TaintStepTest_Append3(source) | ||
| sink(2, out) | ||
| } | ||
| { | ||
| source := newSource(3) | ||
| out := TaintStepTest_Append4(source) | ||
| sink(3, out) | ||
| } | ||
| { | ||
| source := newSource(4) | ||
| out := TaintStepTest_Copy1(source) | ||
| sink(4, out) | ||
| } | ||
| { | ||
| source := newSource(5) | ||
| out := TaintStepTest_Copy2(source) | ||
| sink(5, out) | ||
| } | ||
| { | ||
| source := newSource(3) | ||
| out := TaintStepTest_Max(source) | ||
| sink(3, out) | ||
| } | ||
| { | ||
| source := newSource(4) | ||
| out := TaintStepTest_Min(source) | ||
| sink(4, out) | ||
| } | ||
| { | ||
| source := newSource(5) | ||
| out := TaintStepTest_New(source) | ||
| sink(5, out) | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| module example.com/m | ||
| go 1.24 | ||
| go 1.26 | ||
| require ( | ||
| golang.org/x/net v0.0.0-20201010224723-4f7140c49acb | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.