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

remove 2.x old source #270

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 18 additions & 25 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
version: 2
project_name: checksec

release:
prerelease: auto

env:
- DOCKER_CLI_EXPERIMENTAL=enabled
- CGO_ENABLED=0

builds:
- id: linux
- id: core
binary: checksec
main: ./main.go
buildmode: "pie"
ldflags:
- -s -w
- -X "main.version={{ .Version }}"
- -X "main.commit={{ .Commit }}"
- -X "main.date={{ .Date }}"
env:
- CGO_ENABLED=0
- -extldflags "-Wl,-z,relro,-z,now,-z,noexecstack"
goos:
- linux
- darwin
goarch:
# - amd64
- amd64
- arm64

- id: darwin
- id: windows
binary: checksec
main: ./main.go
ldflags:
Expand All @@ -28,25 +37,9 @@ builds:
env:
- CGO_ENABLED=0
goos:
- darwin
- windows
goarch:
# - amd64
- amd64
- arm64

# - id: windows
# binary: checksec
# main: ./main.go
# ldflags:
# - -s -w
# - -X "main.version={{ .Version }}"
# - -X "main.commit={{ .Commit }}"
# - -X "main.date={{ .Date }}"
# env:
# - CGO_ENABLED=0
# goos:
# - windows
# goarch:
# - amd64
# - arm64
# ldflags:
# - -buildmode=exe
ldflags:
- -buildmode=exe
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
repos:
- repo: local
hooks:
- id: build_checksec
name: build checksec script
entry: bash ./hack/build.sh
language: system
pass_filenames: false
- id: enable_hooks
name: enable git hooks
entry: bash ./hack/enable-git-hooks.sh
Expand Down
36 changes: 0 additions & 36 deletions hack/build.sh

This file was deleted.

4 changes: 2 additions & 2 deletions pkg/checksec/fortify.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func Fortify(name string, binary *elf.File) *fortify {
checked := 0
total := 0

ldd := GetLdd(name)
ldd := getLdd(name)

if ldd == "none" || ldd == "unk" {
res.Output = "N/A"
Expand Down Expand Up @@ -134,7 +134,7 @@ func Fortify(name string, binary *elf.File) *fortify {

}

func GetLdd(filename string) string {
func getLdd(filename string) string {
dynamic := false
file, err := elf.Open(filename)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/checksec/runpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type runpath struct {
Color string
}

// Detect runpath in binary
func RUNPATH(name string) *runpath {
res := runpath{}
file, err := elf.Open(name)
Expand Down
1 change: 1 addition & 0 deletions pkg/checksec/symbols.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type symbols struct {
Color string
}

// SYMBOLS detects usage of elf symbols
func SYMBOLS(name string) *symbols {
res := symbols{}
file, err := elf.Open(name)
Expand Down
129 changes: 0 additions & 129 deletions src/core.sh

This file was deleted.

Loading
Loading