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

feat: restructure cmd folder #388

Merged
merged 1 commit into from
Mar 23, 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
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Build txt-suite
run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o txt-suite cmd/txt-suite/*.go
run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o txt-suite cmd/core/txt-suite/*.go
- name: Build txt-prov
run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o txt-prov cmd/txt-prov/*.go
run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o txt-prov cmd/core/txt-prov/*.go
- name: Build bg-suite
run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o bg-suite cmd/bg-suite/*.go
run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o bg-suite cmd/core/bg-suite/*.go
- name: Build bg-prov
run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o bg-prov cmd/bg-prov/*.go
run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o bg-prov cmd/core/bg-prov/*.go
- name: Build pcr0tool
run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o pcr0tool cmd/pcr0tool/*.go
run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o pcr0tool cmd/exp/pcr0tool/*.go
- name: Build amd-suite
run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o amd-suite cmd/amd-suite/*.go
run: go build -ldflags '-X main.gitcommit=${GITHUB_SHA} -X main.gittag=${github.ref_name} -w -extldflags "-static"' -o amd-suite cmd/exp/amd-suite/*.go
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"hash"
"os"

"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands"
"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/dumpregisters/helpers"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/dumpregisters/helpers"
"github.com/9elements/converged-security-suite/v2/pkg/bootflow/actions/tpmactions"
"github.com/9elements/converged-security-suite/v2/pkg/bootflow/bootengine"
"github.com/9elements/converged-security-suite/v2/pkg/bootflow/datasources"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
pkgbytes "github.com/linuxboot/fiano/pkg/bytes"
fianoUEFI "github.com/linuxboot/fiano/pkg/uefi"

"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands"
"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/diff/format"
"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/dumpregisters/helpers"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/diff/format"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/dumpregisters/helpers"
"github.com/9elements/converged-security-suite/v2/pkg/bootflow/bootengine"
"github.com/9elements/converged-security-suite/v2/pkg/bootflow/flows"
bfformat "github.com/9elements/converged-security-suite/v2/pkg/bootflow/lib/format"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"os"

"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/displayeventlog/format"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/displayeventlog/format"
"github.com/9elements/converged-security-suite/v2/pkg/bootflow/subsystems/trustchains/tpm/pcr"
"github.com/9elements/converged-security-suite/v2/pkg/tpmeventlog"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"os"

"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/dumpregisters/helpers"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/dumpregisters/helpers"
"github.com/9elements/converged-security-suite/v2/pkg/registers"

"gopkg.in/yaml.v3"
Expand Down Expand Up @@ -70,7 +70,7 @@ func (cmd Command) Execute(ctx context.Context, args []string) {
if err != nil {
panic(fmt.Sprintf("failed to marshal registers into json, err: %v", err))
}
err = os.WriteFile(*cmd.outputFile, b, 0666)
err = os.WriteFile(*cmd.outputFile, b, 0o666)
if err != nil {
panic(fmt.Sprintf("failed to write data to file %s, err: %v", *cmd.outputFile, err))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"os"
"strings"

"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands"
"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/dumpregisters/helpers"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/dumpregisters/helpers"
"github.com/9elements/converged-security-suite/v2/pkg/bootflow/bootengine"
"github.com/9elements/converged-security-suite/v2/pkg/bootflow/flows"
"github.com/9elements/converged-security-suite/v2/pkg/bootflow/lib/format"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
_ "net/http/pprof"
"os"

"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/dumpregisters/helpers"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/dumpregisters/helpers"
"github.com/9elements/converged-security-suite/v2/pkg/bootflow/bootengine"
"github.com/9elements/converged-security-suite/v2/pkg/bootflow/bootengine/validator"
"github.com/9elements/converged-security-suite/v2/pkg/bootflow/flows"
Expand Down
22 changes: 11 additions & 11 deletions cmd/pcr0tool/main.go → cmd/exp/pcr0tool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ import (
"os"
"sort"

"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands"
bruteforceacmpolicystatus "github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/bruteforce_acm_policy_status"
"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/diff"
"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/displayeventlog"
"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/displayfwinfo"
"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/dumpfit"
"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/dumpregisters"
"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/pcrread"
"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/printnodes"
"github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/sum"
validatesecurity "github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/commands/validate_security"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands"
bruteforceacmpolicystatus "github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/bruteforce_acm_policy_status"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/diff"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/displayeventlog"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/displayfwinfo"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/dumpfit"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/dumpregisters"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/pcrread"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/printnodes"
"github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/sum"
validatesecurity "github.com/9elements/converged-security-suite/v2/cmd/exp/pcr0tool/commands/validate_security"
"github.com/9elements/converged-security-suite/v2/pkg/log"
"github.com/facebookincubator/go-belt/tool/logger"
"github.com/facebookincubator/go-belt/tool/logger/implementation/logrus"
Expand Down
Loading