Skip to content
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

exercism demo should not require login #11

Merged
merged 2 commits into from
Sep 27, 2013
Merged

Conversation

kytrinyx
Copy link
Member

Demo should probably just download a demo into the current directory, in a subdirectory named exercism-demo or something like that, where each language is nested below it.

@kytrinyx
Copy link
Member Author

@msgehard - the way I'm thinking of solving this is to create a guestConfig object, using os.Getwd to get the current working directory, then os.Mkdir to create the subdirectory, and sticking the full path to that subdirectory in the guestConfig as the project path.

Does that seem like a reasonable approach?

@mikegehard
Copy link
Contributor

My thoughts on how I would go about solving it:

Option 1 (quick and dirty): Pass in an empty API key

assignments, err := exercism.FetchAssignments(config.Hostname, exercism.FetchEndpoints["demo"], "")

As long as the server doesn't check for the API key that should work.

Option 2 (a little more work but better in the long run):

Define a FetchDemoAssignments(hostname string) function that returns a slice of assignments.

You could then save them where ever you want in using:

err := exercism.SaveAssignment("some demo directory", a)

Here I need some way to get the demo directory. I'm not sure I'd use another object to store that since all we need is a way to calculate it and it will always be the same...I think.

Let me know if this jives with your thoughts from above. I think the only place we may differ is in the addition of a guest config object.

@kytrinyx
Copy link
Member Author

Yeah, that sounds good.

I was trying to write a test for the DemoDirectory:

func TestDemoDir(t *testing.T) {
    path, err := ioutil.TempDir("", "")
    assert.Equal(t, "", path)
    assert.NoError(t, err)
    os.Chdir(path)

    demoDir, err := DemoDirectory()

    assert.Equal(t, demoDir, path+"/exercism-demo")
}

With something like this:

func DemoDirectory() (dir string, err error) {
    dir, err = os.Getwd()
    if err != nil {
        return
    }
    dir = dir + "/exercism-demo"
    return
}

The problem is that assertion fails because demoDir is "/var/folders/$GARBLE" and the test directory we created is "/private/var/folders/$GARBLE". Technically these are the same (/var is a symlink to /private/var).

Any idea how best to resolve that aside from just not having an automated test, that is)?

If you are not logged in, there's no way to know where you want to
download sample files to. A subdirectory under the current working
directory seems reasonable, and it's easier to move the result around or
delete it (because each language gets a subdirectory under that).
@kytrinyx
Copy link
Member Author

I figured it out :) path/filepath#EvalSymlinks() FTW.

If no config is found, create a demo directory in the current working
directory, and download the assignments to it.

This needs refactoring, but I don't know Go well enough to do that yet.
@kytrinyx
Copy link
Member Author

UPDATE: I solved it the dirty way. I'll try to pair with someone to figure out the better way.

@@ -20,8 +20,17 @@ func main() {
Action: func(c *cli.Context) {
config, err := exercism.ConfigFromFile(exercism.HomeDir())
if err != nil {
fmt.Println("Are you sure you are logged in? Please login again.")
return
demoDir, err2 := exercism.DemoDirectory()

Choose a reason for hiding this comment

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

Another way to write this code would be:

config, err := exercism.ConfigFromFile(exercism.HomeDir())
if err != nil {  
  if demoDir, err := exercism.DemoDirectory(); err != nil {
     fmt.Println(err)
     return
  }
  config = exercism.Config{
    Hostname: "http://exercism.io",
    ApiKey: "",
    ExercismDirectory: demoDir,
  }
}

@kytrinyx
Copy link
Member Author

Thanks for all the comments, @mattetti. I'm going to leave the named returns, since that is a repository-wide choice at the moment. I'd love to hear more of the pros/cons if you have blog posts or musings lying around somewhere.

@mattetti
Copy link

To tell you the truth I mainly follow the advice @nf once gave me. Since Go
is all about being explicit, I'm surprised that the language design
included implicit returned values. My major problem with the implicit
returned values is that I'm not always sure what is being returned, it
forces me to go up to the function/method signature, read the names, go
back to the body, scan for the where the value is set before it's returned.

On Thu, Sep 26, 2013 at 10:48 PM, Katrina Owen notifications@github.comwrote:

Thanks for all the comments, @mattetti https://github.com/mattetti. I'm
going to leave the named returns, since that is a repository-wide choice at
the moment. I'd love to hear more of the pros/cons if you have blog posts
or musings lying around somewhere.


Reply to this email directly or view it on GitHubhttps://github.com//pull/11#issuecomment-25218992
.

@nf
Copy link

nf commented Sep 27, 2013

The "naked return" does have its readability drawbacks. It can also cause subtle errors where new variables shadow the return values in nested scopes. I tend to use it only in very short functions.

I mostly use named return values only when the names add necessary documentation. For instance, it's pretty clear what the return values of this function are, even without names:

func DemoDir() (string, error)

so I'd not used named return values here. But, say, this function decl

func Foo() (min, max int)

is a lot clearer than

func Foo() (int, int)

@mattetti
Copy link

thank you very much @nf!

kytrinyx added a commit that referenced this pull request Sep 27, 2013
`exercism demo` should not require login
@kytrinyx kytrinyx merged commit 54b4abd into master Sep 27, 2013
@kytrinyx kytrinyx deleted the demo-without-login branch September 27, 2013 11:10
lcowell pushed a commit to lcowell/cli that referenced this pull request Jan 25, 2015
`exercism demo` should not require login
nywilken added a commit to nywilken/exercism-cli that referenced this pull request Oct 2, 2023
* Bump Go tooling to use 1.20.x for release and testing.
```
Scanning your code and 207 packages across 19 dependent modules for known vulnerabilities...

Vulnerability #1: GO-2023-2043
    Improper handling of special tags within script contexts in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-2043
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.21.1
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute

Vulnerability exercism#2: GO-2023-2041
    Improper handling of HTML-like comments in script contexts in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-2041
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.21.1
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute

Vulnerability exercism#3: GO-2023-1987
    Large RSA keys can cause high CPU usage in crypto/tls
  More info: https://pkg.go.dev/vuln/GO-2023-1987
  Standard library
    Found in: crypto/tls@go1.19.8
    Fixed in: crypto/tls@go1.21rc4
    Example traces found:
      #1: api/client.go:68:25: api.Client.Do calls http.Client.Do, which eventually calls tls.Conn.HandshakeContext
      exercism#2: cli/cli.go:199:23: cli.extractBinary calls io.Copy, which eventually calls tls.Conn.Read
      exercism#3: debug/debug.go:32:14: debug.Printf calls fmt.Fprintf, which calls tls.Conn.Write
      exercism#4: api/client.go:68:25: api.Client.Do calls http.Client.Do, which eventually calls tls.Dialer.DialContext

Vulnerability exercism#4: GO-2023-1878
    Insufficient sanitization of Host header in net/http
  More info: https://pkg.go.dev/vuln/GO-2023-1878
  Standard library
    Found in: net/http@go1.19.8
    Fixed in: net/http@go1.20.6
    Example traces found:
      #1: api/client.go:68:25: api.Client.Do calls http.Client.Do
      exercism#2: cmd/troubleshoot.go:206:32: cmd.apiPing.Call calls http.Client.Get

Vulnerability exercism#5: GO-2023-1840
    Unsafe behavior in setuid/setgid binaries in runtime
  More info: https://pkg.go.dev/vuln/GO-2023-1840
  Standard library
    Found in: runtime@go1.19.8
    Fixed in: runtime@go1.20.5
    Example traces found:
      #1: debug/debug.go:80:12: debug.DumpResponse calls log.Fatal, which eventually calls runtime.Caller
      exercism#2: workspace/exercise_metadata.go:39:26: workspace.NewExerciseMetadata calls json.Unmarshal, which eventually calls runtime.Callers
      exercism#3: workspace/exercise_metadata.go:39:26: workspace.NewExerciseMetadata calls json.Unmarshal, which eventually calls runtime.CallersFrames
      exercism#4: workspace/exercise_metadata.go:39:26: workspace.NewExerciseMetadata calls json.Unmarshal, which eventually calls runtime.Frames.Next
      exercism#5: cmd/root.go:39:27: cmd.Execute calls cobra.Command.Execute, which eventually calls runtime.GC
      exercism#6: workspace/exercise_metadata.go:66:24: workspace.ExerciseMetadata.Write calls json.Marshal, which eventually calls runtime.GOMAXPROCS
      exercism#7: config/config.go:57:18: config.Dir calls os.Getenv, which eventually calls runtime.GOROOT
      exercism#8: cli/cli.go:202:29: cli.extractBinary calls os.File.Seek, which eventually calls runtime.KeepAlive
      exercism#9: cli/cli.go:135:2: cli.CLI.Upgrade calls os.File.Close, which eventually calls runtime.SetFinalizer
      exercism#10: debug/debug.go:32:14: debug.Printf calls fmt.Fprintf, which eventually calls runtime.Stack
      exercism#11: cmd/root.go:39:27: cmd.Execute calls cobra.Command.Execute, which eventually calls runtime.TypeAssertionError.Error
      exercism#12: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which calls runtime.defaultMemProfileRate
      exercism#13: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which calls runtime.efaceOf
      exercism#14: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which eventually calls runtime.findfunc
      exercism#15: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which calls runtime.float64frombits
      exercism#16: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which eventually calls runtime.forcegchelper
      exercism#17: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which eventually calls runtime.funcMaxSPDelta
      exercism#18: cmd/root.go:39:27: cmd.Execute calls cobra.Command.Execute, which eventually calls runtime.plainError.Error
      exercism#19: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which eventually calls runtime.throw

Vulnerability exercism#6: GO-2023-1753
    Improper handling of empty HTML attributes in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-1753
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.20.4
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute

Vulnerability exercism#7: GO-2023-1752
    Improper handling of JavaScript whitespace in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-1752
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.20.4
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute

Vulnerability exercism#8: GO-2023-1751
    Improper sanitization of CSS values in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-1751
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.20.4
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute
```
nywilken added a commit to nywilken/exercism-cli that referenced this pull request Oct 2, 2023
* Bump Go tooling to use 1.20.x for release and testing.
```
Scanning your code and 207 packages across 19 dependent modules for known vulnerabilities...

Vulnerability #1: GO-2023-2043
    Improper handling of special tags within script contexts in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-2043
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.21.1
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute

Vulnerability exercism#2: GO-2023-2041
    Improper handling of HTML-like comments in script contexts in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-2041
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.21.1
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute

Vulnerability exercism#3: GO-2023-1987
    Large RSA keys can cause high CPU usage in crypto/tls
  More info: https://pkg.go.dev/vuln/GO-2023-1987
  Standard library
    Found in: crypto/tls@go1.19.8
    Fixed in: crypto/tls@go1.21rc4
    Example traces found:
      #1: api/client.go:68:25: api.Client.Do calls http.Client.Do, which eventually calls tls.Conn.HandshakeContext
      exercism#2: cli/cli.go:199:23: cli.extractBinary calls io.Copy, which eventually calls tls.Conn.Read
      exercism#3: debug/debug.go:32:14: debug.Printf calls fmt.Fprintf, which calls tls.Conn.Write
      exercism#4: api/client.go:68:25: api.Client.Do calls http.Client.Do, which eventually calls tls.Dialer.DialContext

Vulnerability exercism#4: GO-2023-1878
    Insufficient sanitization of Host header in net/http
  More info: https://pkg.go.dev/vuln/GO-2023-1878
  Standard library
    Found in: net/http@go1.19.8
    Fixed in: net/http@go1.20.6
    Example traces found:
      #1: api/client.go:68:25: api.Client.Do calls http.Client.Do
      exercism#2: cmd/troubleshoot.go:206:32: cmd.apiPing.Call calls http.Client.Get

Vulnerability exercism#5: GO-2023-1840
    Unsafe behavior in setuid/setgid binaries in runtime
  More info: https://pkg.go.dev/vuln/GO-2023-1840
  Standard library
    Found in: runtime@go1.19.8
    Fixed in: runtime@go1.20.5
    Example traces found:
      #1: debug/debug.go:80:12: debug.DumpResponse calls log.Fatal, which eventually calls runtime.Caller
      exercism#2: workspace/exercise_metadata.go:39:26: workspace.NewExerciseMetadata calls json.Unmarshal, which eventually calls runtime.Callers
      exercism#3: workspace/exercise_metadata.go:39:26: workspace.NewExerciseMetadata calls json.Unmarshal, which eventually calls runtime.CallersFrames
      exercism#4: workspace/exercise_metadata.go:39:26: workspace.NewExerciseMetadata calls json.Unmarshal, which eventually calls runtime.Frames.Next
      exercism#5: cmd/root.go:39:27: cmd.Execute calls cobra.Command.Execute, which eventually calls runtime.GC
      exercism#6: workspace/exercise_metadata.go:66:24: workspace.ExerciseMetadata.Write calls json.Marshal, which eventually calls runtime.GOMAXPROCS
      exercism#7: config/config.go:57:18: config.Dir calls os.Getenv, which eventually calls runtime.GOROOT
      exercism#8: cli/cli.go:202:29: cli.extractBinary calls os.File.Seek, which eventually calls runtime.KeepAlive
      exercism#9: cli/cli.go:135:2: cli.CLI.Upgrade calls os.File.Close, which eventually calls runtime.SetFinalizer
      exercism#10: debug/debug.go:32:14: debug.Printf calls fmt.Fprintf, which eventually calls runtime.Stack
      exercism#11: cmd/root.go:39:27: cmd.Execute calls cobra.Command.Execute, which eventually calls runtime.TypeAssertionError.Error
      exercism#12: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which calls runtime.defaultMemProfileRate
      exercism#13: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which calls runtime.efaceOf
      exercism#14: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which eventually calls runtime.findfunc
      exercism#15: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which calls runtime.float64frombits
      exercism#16: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which eventually calls runtime.forcegchelper
      exercism#17: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which eventually calls runtime.funcMaxSPDelta
      exercism#18: cmd/root.go:39:27: cmd.Execute calls cobra.Command.Execute, which eventually calls runtime.plainError.Error
      exercism#19: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which eventually calls runtime.throw

Vulnerability exercism#6: GO-2023-1753
    Improper handling of empty HTML attributes in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-1753
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.20.4
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute

Vulnerability exercism#7: GO-2023-1752
    Improper handling of JavaScript whitespace in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-1752
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.20.4
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute

Vulnerability exercism#8: GO-2023-1751
    Improper sanitization of CSS values in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-1751
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.20.4
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute
```
ErikSchierboom pushed a commit that referenced this pull request Oct 5, 2023
* Bump minimum Go version to 1.18

This change bumps the minimum Go version to 1.18 to take advantage of a
number of fixes to the language, while matching the minimum version for
a number of key dependencies which have been moving away from Go 1.15.

This change drops support for Go 1.15 in the Exercism CLI.

* Bump minimum go version to 1.19

* fix: update build tags to Go 1.18 syntax

```
~> go1.18.10 fix ./...
```

* Replace calls to deprecated io/ioutil pkg

* fix(deps): update module github.com/spf13/viper to v1.15.0

This change bumps spf13/viper to address reported vulnerabilities in
yaml.v2

```
~>  govulncheck -test ./...
Scanning your code and 210 packages across 21 dependent modules for known vulnerabilities...

Vulnerability #1: GO-2022-0956
    Excessive resource consumption in gopkg.in/yaml.v2
  More info: https://pkg.go.dev/vuln/GO-2022-0956
  Module: gopkg.in/yaml.v2
    Found in: gopkg.in/yaml.v2@v2.0.0-20170721122051-25c4ec802a7d
    Fixed in: gopkg.in/yaml.v2@v2.2.4
    Example traces found:
      #1: cmd/submit.go:129:23: cmd.getExerciseSolutionFiles calls viper.Viper.ReadInConfig, which eventually calls yaml.Unmarshal

Vulnerability #2: GO-2021-0061
    Denial of service in gopkg.in/yaml.v2
  More info: https://pkg.go.dev/vuln/GO-2021-0061
  Module: gopkg.in/yaml.v2
    Found in: gopkg.in/yaml.v2@v2.0.0-20170721122051-25c4ec802a7d
    Fixed in: gopkg.in/yaml.v2@v2.2.3
    Example traces found:
      #1: cmd/submit.go:129:23: cmd.getExerciseSolutionFiles calls viper.Viper.ReadInConfig, which eventually calls yaml.Unmarshal

Vulnerability #3: GO-2020-0036
    Excessive resource consumption in YAML parsing in gopkg.in/yaml.v2
  More info: https://pkg.go.dev/vuln/GO-2020-0036
  Module: gopkg.in/yaml.v2
    Found in: gopkg.in/yaml.v2@v2.0.0-20170721122051-25c4ec802a7d
    Fixed in: gopkg.in/yaml.v2@v2.2.8
    Example traces found:
      #1: cmd/submit.go:129:23: cmd.getExerciseSolutionFiles calls viper.Viper.ReadInConfig, which eventually calls yaml.Unmarshal

```

* deps: update module github.com/spf13/cobra to v1.7.0

* deps: update module github.com/stretchr/testify to v1.8.4

* workflows/ci.yml: Add multiple Go versions to testing matrix

This change officially removes Go 1.15 from the testing matrix and adds the Go versions used
for supporting the Exercism CLI. Namely Go 1.19, 1.20, and 1.21.x.

* Bump minimum Go version to 1.20

* Bump Go tooling to use 1.20.x for release and testing.
```
Scanning your code and 207 packages across 19 dependent modules for known vulnerabilities...

Vulnerability #1: GO-2023-2043
    Improper handling of special tags within script contexts in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-2043
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.21.1
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute

Vulnerability #2: GO-2023-2041
    Improper handling of HTML-like comments in script contexts in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-2041
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.21.1
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute

Vulnerability #3: GO-2023-1987
    Large RSA keys can cause high CPU usage in crypto/tls
  More info: https://pkg.go.dev/vuln/GO-2023-1987
  Standard library
    Found in: crypto/tls@go1.19.8
    Fixed in: crypto/tls@go1.21rc4
    Example traces found:
      #1: api/client.go:68:25: api.Client.Do calls http.Client.Do, which eventually calls tls.Conn.HandshakeContext
      #2: cli/cli.go:199:23: cli.extractBinary calls io.Copy, which eventually calls tls.Conn.Read
      #3: debug/debug.go:32:14: debug.Printf calls fmt.Fprintf, which calls tls.Conn.Write
      #4: api/client.go:68:25: api.Client.Do calls http.Client.Do, which eventually calls tls.Dialer.DialContext

Vulnerability #4: GO-2023-1878
    Insufficient sanitization of Host header in net/http
  More info: https://pkg.go.dev/vuln/GO-2023-1878
  Standard library
    Found in: net/http@go1.19.8
    Fixed in: net/http@go1.20.6
    Example traces found:
      #1: api/client.go:68:25: api.Client.Do calls http.Client.Do
      #2: cmd/troubleshoot.go:206:32: cmd.apiPing.Call calls http.Client.Get

Vulnerability #5: GO-2023-1840
    Unsafe behavior in setuid/setgid binaries in runtime
  More info: https://pkg.go.dev/vuln/GO-2023-1840
  Standard library
    Found in: runtime@go1.19.8
    Fixed in: runtime@go1.20.5
    Example traces found:
      #1: debug/debug.go:80:12: debug.DumpResponse calls log.Fatal, which eventually calls runtime.Caller
      #2: workspace/exercise_metadata.go:39:26: workspace.NewExerciseMetadata calls json.Unmarshal, which eventually calls runtime.Callers
      #3: workspace/exercise_metadata.go:39:26: workspace.NewExerciseMetadata calls json.Unmarshal, which eventually calls runtime.CallersFrames
      #4: workspace/exercise_metadata.go:39:26: workspace.NewExerciseMetadata calls json.Unmarshal, which eventually calls runtime.Frames.Next
      #5: cmd/root.go:39:27: cmd.Execute calls cobra.Command.Execute, which eventually calls runtime.GC
      #6: workspace/exercise_metadata.go:66:24: workspace.ExerciseMetadata.Write calls json.Marshal, which eventually calls runtime.GOMAXPROCS
      #7: config/config.go:57:18: config.Dir calls os.Getenv, which eventually calls runtime.GOROOT
      #8: cli/cli.go:202:29: cli.extractBinary calls os.File.Seek, which eventually calls runtime.KeepAlive
      #9: cli/cli.go:135:2: cli.CLI.Upgrade calls os.File.Close, which eventually calls runtime.SetFinalizer
      #10: debug/debug.go:32:14: debug.Printf calls fmt.Fprintf, which eventually calls runtime.Stack
      #11: cmd/root.go:39:27: cmd.Execute calls cobra.Command.Execute, which eventually calls runtime.TypeAssertionError.Error
      #12: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which calls runtime.defaultMemProfileRate
      #13: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which calls runtime.efaceOf
      #14: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which eventually calls runtime.findfunc
      #15: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which calls runtime.float64frombits
      #16: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which eventually calls runtime.forcegchelper
      #17: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which eventually calls runtime.funcMaxSPDelta
      #18: cmd/root.go:39:27: cmd.Execute calls cobra.Command.Execute, which eventually calls runtime.plainError.Error
      #19: workspace/test_configurations.go:5:2: workspace.init calls runtime.init, which eventually calls runtime.throw

Vulnerability #6: GO-2023-1753
    Improper handling of empty HTML attributes in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-1753
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.20.4
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute

Vulnerability #7: GO-2023-1752
    Improper handling of JavaScript whitespace in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-1752
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.20.4
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute

Vulnerability #8: GO-2023-1751
    Improper sanitization of CSS values in html/template
  More info: https://pkg.go.dev/vuln/GO-2023-1751
  Standard library
    Found in: html/template@go1.19.8
    Fixed in: html/template@go1.20.4
    Example traces found:
      #1: cmd/troubleshoot.go:127:20: cmd.Status.compile calls template.Template.Execute
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants