Skip to content

Commit

Permalink
Qodana updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Ne0nd0g committed Oct 29, 2023
1 parent 5cc4b86 commit e6d29f1
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 18 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/qodana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ jobs:
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
- name: 'Qodana SARIF Upload
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[![Build](https://github.com/Ne0nd0g/merlin-cli/actions/workflows/go.yml/badge.svg)](https://github.com/Ne0nd0g/merlin-cli/actions/workflows/go.yml)
[![GoReportCard](https://goreportcard.com/badge/github.com/Ne0nd0g/merlin-cli)](https://goreportcard.com/report/github.com/Ne0nd0g/merlin-cli)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Release](https://img.shields.io/github/release/Ne0nd0g/merlin-message.svg)](https://github.com/Ne0nd0g/merlin-cli/releases/latest)
[![Downloads](https://img.shields.io/github/downloads/Ne0nd0g/merlin-message/total.svg)](https://github.com/Ne0nd0g/merlin-cli/releases)
[![Qodana](https://github.com/Ne0nd0g/merlin-cli/actions/workflows/qodana.yml/badge.svg)](https://github.com/Ne0nd0g/merlin-cli/actions/workflows/qodana.yml)
[![CodeQL](https://github.com/Ne0nd0g/merlin-cli/actions/workflows/codeql.yml/badge.svg)](https://github.com/Ne0nd0g/merlin-cli/actions/workflows/codeql.yml)
[![Twitter Follow](https://img.shields.io/twitter/follow/merlin_c2.svg?style=social&label=Follow)](https://twitter.com/merlin_c2)

# Merlin CLI
Expand Down
12 changes: 9 additions & 3 deletions commands/all/banner/banner.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,15 @@ func (c *Command) Do(m menu.Menu, id uuid.UUID, arguments string) (response comm
}

msg := "\n"
msg += color.BlueString(banner.MerlinBanner1)
msg += color.BlueString("\r\n\t\t Version: %s", merlin.Version)
msg += color.BlueString("\r\n\t\t Build: %s\n", merlin.Build)
if len(args) > 1 {
if strings.ToLower(args[1]) == "gandalf" {
msg += color.BlueString(banner.MerlinBanner2)
}
} else {
msg += color.BlueString(banner.MerlinBanner1)
}
msg += color.BlueString("\n\t\t Version: %s", merlin.Version)
msg += color.BlueString("\n\t\t Build: %s\n", merlin.Build)

response.Message = message.NewUserMessage(message.Plain, msg)
return
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
require (
github.com/chzyer/readline v1.5.1
github.com/fatih/color v1.15.0
github.com/google/uuid v1.3.1
github.com/google/uuid v1.4.0
github.com/mattn/go-shellwords v1.0.12
github.com/olekukonko/tablewriter v0.0.5
google.golang.org/grpc v1.59.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4=
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
Expand Down
13 changes: 0 additions & 13 deletions services/rpc/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,6 @@ func GetAllActiveJobs() (jobs []job.Job, err error) {
return
}

// GetAllJobs returns all Agent jobs from the RPC server
func GetAllJobs() (jobs []job.Job, err error) {
response, err := service.merlinClient.GetAllJobs(context.Background(), &emptypb.Empty{})
if err != nil {
err = fmt.Errorf("there was an error calling the GetAllJobs RPC method: %s", err)
return
}
for _, j := range response.Jobs {
jobs = append(jobs, jobFromJobInfo(j))
}
return
}

// jobFromJobInfo converts a job protobuf message into a Job message structure used on the client
func jobFromJobInfo(j *pb.Job) job.Job {
return job.Job{
Expand Down

0 comments on commit e6d29f1

Please sign in to comment.