mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 03:55:54 +00:00
Change test
I thought that an example where the user inputs a URL is more realistic. Because if your operating system is already hacked then you are already screwed. Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
This commit is contained in:
parent
8048b15efa
commit
9cdfec40ca
1 changed files with 6 additions and 1 deletions
|
@ -323,9 +323,14 @@ import (
|
|||
"io/ioutil"
|
||||
"fmt"
|
||||
"os"
|
||||
"bufio"
|
||||
)
|
||||
func main() {
|
||||
url := os.Getenv("tainted_url")
|
||||
in := bufio.NewReader(os.Stdin)
|
||||
url, err := in.ReadString('\n')
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
resp, err := http.Get(url)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
Loading…
Reference in a new issue