Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Commit

Permalink
Deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
lemon-mint committed Mar 24, 2022
1 parent 0008b3a commit b189a94
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# 💥 Deprecation notice 💥

This repository no longer actively maintained.

**This Project moved to [silverlining](https://github.com/go-www/silverlining/tree/main/h1)**

# h1
Yet another HTTP/1.1 library

2 comments on commit b189a94

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark Results (OS:linux)

Benchmark BenchmarkParseRequest

goos: linux
goarch: amd64
pkg: github.com/go-www/h1
cpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
BenchmarkParseRequest-2   	 6354300	       188.6 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/go-www/h1	1.554s

CPU Profile

CPU Profile

Memory Profile

Memory Profile

Benchmark Benchmark_stricmp

goos: linux
goarch: amd64
pkg: github.com/go-www/h1
cpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
Benchmark_stricmp-2   	19343539	        61.64 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/go-www/h1	1.411s

CPU Profile

CPU Profile

Memory Profile

Memory Profile

Benchmark Benchmark_ContentLength_stricmp

goos: linux
goarch: amd64
pkg: github.com/go-www/h1
cpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
Benchmark_ContentLength_stricmp-2   	48117024	        26.34 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/go-www/h1	1.405s

CPU Profile

CPU Profile

Memory Profile

Memory Profile

Benchmark Benchmark_Net_URL_Parse

goos: linux
goarch: amd64
pkg: github.com/go-www/h1
cpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
Benchmark_Net_URL_Parse-2   	 6200278	       190.0 ns/op	     144 B/op	       1 allocs/op
PASS
ok  	github.com/go-www/h1	1.555s

CPU Profile

CPU Profile

Memory Profile

Memory Profile

Benchmark Benchmark_H1_URI_Parse

goos: linux
goarch: amd64
pkg: github.com/go-www/h1
cpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
Benchmark_H1_URI_Parse-2   	184972150	         6.494 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/go-www/h1	2.041s

CPU Profile

CPU Profile

Memory Profile

Memory Profile

Benchmark Benchmark_H1_URI_Query

goos: linux
goarch: amd64
pkg: github.com/go-www/h1
cpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
Benchmark_H1_URI_Query-2   	10906584	       109.2 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/go-www/h1	1.427s

CPU Profile

CPU Profile

Memory Profile

Memory Profile

Benchmark Benchmark_Request_Reader

goos: linux
goarch: amd64
pkg: github.com/go-www/h1
cpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
Benchmark_Request_Reader-2   	 5388620	       219.2 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/go-www/h1	1.540s

CPU Profile

CPU Profile

Memory Profile

Memory Profile

@github-actions
Copy link

Choose a reason for hiding this comment

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

Golang CI Tools Report

Report generated at: 2022-03-24T14:46:14Z

Go version: go1.17.7

golang-ci-tools version: 0.1.2-dev

staticcheck

🎉  No staticcheck errors found!

gosec

** Issue Detected **

[gosec] 2022/03/24 14:46:19 Including rules: default
[gosec] 2022/03/24 14:46:19 Excluding rules: default
[gosec] 2022/03/24 14:46:19 Import directory: /home/runner/work/h1/h1/tests
[gosec] 2022/03/24 14:46:19 Import directory: /home/runner/work/h1/h1/tests/urlescape
[gosec] 2022/03/24 14:46:20 Import directory: /home/runner/work/h1/h1/testserver
[gosec] 2022/03/24 14:46:20 Checking package: main
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/tests/urlescape/escape.go
[gosec] 2022/03/24 14:46:20 Import directory: /home/runner/work/h1/h1
[gosec] 2022/03/24 14:46:20 Checking package: main
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/tests/run.go
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/tests/upload.go
[gosec] 2022/03/24 14:46:20 Checking package: main
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/testserver/main.go
[gosec] 2022/03/24 14:46:20 Import directory: /home/runner/work/h1/h1/encoding/percent
[gosec] 2022/03/24 14:46:20 Checking package: percent
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/encoding/percent/hex.go
[gosec] 2022/03/24 14:46:20 Import directory: /home/runner/work/h1/h1/fuzz
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/encoding/percent/percent.go
[gosec] 2022/03/24 14:46:20 Checking package: h1
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/any.go
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/fastdate.go
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/headers.go
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/methods.go
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/reader.go
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/request.go
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/response.go
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/status.go
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/strbytes.go
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/stricmp.go
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/uri.go
[gosec] 2022/03/24 14:46:20 Checking package: fuzz
[gosec] 2022/03/24 14:46:20 Checking file: /home/runner/work/h1/h1/fuzz/fuzz.go
Results:


[/home/runner/work/h1/h1/tests/run.go:50] - G204 (CWE-78): Subprocess launched with a potential tainted input or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
    49: 		var MemImageBuffer bytes.Buffer
  > 50: 		cmd = exec.Command("go", "tool", "pprof", "-png", "./testOutput/"+benchmark+"_memprofile.out")
    51: 		cmd.Stdout = &MemImageBuffer



[/home/runner/work/h1/h1/tests/run.go:41] - G204 (CWE-78): Subprocess launched with a potential tainted input or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
    40: 		var CPUImageBuffer bytes.Buffer
  > 41: 		cmd = exec.Command("go", "tool", "pprof", "-png", "./testOutput/"+benchmark+"_profile.out")
    42: 		cmd.Stdout = &CPUImageBuffer



[/home/runner/work/h1/h1/tests/run.go:32] - G204 (CWE-78): Subprocess launched with a potential tainted input or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
    31: 		var buffer bytes.Buffer
  > 32: 		cmd := exec.Command("go", "test", "-bench="+benchmark, "-benchmem", "-cpuprofile", "testOutput/"+benchmark+"_profile.out", "-memprofile", "testOutput/"+benchmark+"_memprofile.out")
    33: 		cmd.Stdout = &buffer



[/home/runner/work/h1/h1/tests/urlescape/escape.go:12] - G304 (CWE-22): Potential file inclusion via variable (Confidence: HIGH, Severity: MEDIUM)
    11: 	filename := os.Args[1]
  > 12: 	file, err := os.Open(filename)
    13: 	if err != nil {



[/home/runner/work/h1/h1/tests/run.go:23] - G301 (CWE-276): Expect directory permissions to be 0750 or less (Confidence: HIGH, Severity: MEDIUM)
    22: func main() {
  > 23: 	err := os.Mkdir("testOutput", 0777)
    24: 	if err != nil {



[/home/runner/work/h1/h1/tests/urlescape/escape.go:16] - G307 (CWE-703): Deferring unsafe method "Close" on type "*os.File" (Confidence: HIGH, Severity: MEDIUM)
    15: 	}
  > 16: 	defer file.Close()
    17: 	data, err := io.ReadAll(file)



[/home/runner/work/h1/h1/testserver/main.go:57] - G102 (CWE-200): Binds to all network interfaces (Confidence: HIGH, Severity: MEDIUM)
    56: func main() {
  > 57: 	ln, err := net.Listen("tcp", ":50901")
    58: 	if err != nil {



[/home/runner/work/h1/h1/fastdate.go:51] - G103 (CWE-242): Use of unsafe calls should be audited (Confidence: HIGH, Severity: LOW)
    50: 
  > 51: 	atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&fds.current)), unsafe.Pointer(new))
    52: }



[/home/runner/work/h1/h1/fastdate.go:51] - G103 (CWE-242): Use of unsafe calls should be audited (Confidence: HIGH, Severity: LOW)
    50: 
  > 51: 	atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&fds.current)), unsafe.Pointer(new))
    52: }



[/home/runner/work/h1/h1/testserver/main.go:44] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
    43: 		resp.WriteHeader(200)
  > 44: 		resp.WriteString("Hello, World!")
    45: 



[/home/runner/work/h1/h1/testserver/main.go:43] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
    42: 		//resp.Connection = h1.ConnectionKeepAlive
  > 43: 		resp.WriteHeader(200)
    44: 		resp.WriteString("Hello, World!")



[/home/runner/work/h1/h1/fuzz/fuzz.go:11] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
    10: 	var r h1.Request
  > 11: 	h1.ParseRequest(&r, bytes.NewReader(data))
    12: 	return 0



Summary:
  Gosec  : dev
  Files  : 18
  Lines  : 1460
  Nosec  : 2
  Issues : 12


gocap

github.com/go-www/h1 (network, reflect, unsafe)


go-licenses

Package Name License File License
github.com/go-www/h1 https://github.com/go-www/h1/blob/master/LICENSE MIT

Dependencies

Total dependencies: 0

Show Full Dependencies

Please sign in to comment.