Skip to content

Commit

Permalink
Merge pull request #270 from slimm609/remove_old_sources
Browse files Browse the repository at this point in the history
remove 2.x old source
  • Loading branch information
slimm609 authored Dec 10, 2024
2 parents 0f4b298 + b4a6b4a commit a4a950e
Show file tree
Hide file tree
Showing 27 changed files with 22 additions and 1,979 deletions.
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

0 comments on commit a4a950e

Please sign in to comment.