Skip to content

Commit

Permalink
updated package path to rita-legacy
Browse files Browse the repository at this point in the history
Co-Authored-By: Naomi Kramer <[email protected]>
  • Loading branch information
lisaSW and caffeinatedpixel committed Jul 3, 2024
1 parent 423287f commit 7db13b2
Show file tree
Hide file tree
Showing 143 changed files with 554 additions and 547 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
# docker container create --name rita --entrypoint /bin/sleep quay.io/activecm/rita:test 5m
# docker container start rita
# docker container exec rita tar cf vendor.tar vendor
# docker container cp rita:/go/src/github.com/activecm/rita/rita ./rita
# docker container cp rita:/go/src/github.com/activecm/rita/vendor.tar ./vendor.tar
# docker container cp rita:/go/src/github.com/activecm/rita-legacy/rita ./rita
# docker container cp rita:/go/src/github.com/activecm/rita-legacy/vendor.tar ./vendor.tar
# docker container stop rita
# tar xf vendor.tar
# - run: make integration-test
16 changes: 8 additions & 8 deletions Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ reports

Just be sure to do the following:
* Check if the bug is already accounted for on the
[Github issue tracker](https://github.com/activecm/rita/issues)
[Github issue tracker](https://github.com/activecm/rita-legacy/issues)
* If an issue already exists, add the relevant info in a comment
* If not, create an issue and include the relevant info
* Give very specific descriptions of how to reproduce the bug
Expand All @@ -23,24 +23,24 @@ There are several ways to contribute code to the RITA project.
Before diving in, follow the [Manual Installation Instructions](docs/Manual%20Installation.md)

* Work on bug fixes:
* Find an issue you would like to work on in the Github tracker, especially [unassigned issues marked "good first issue"](https://github.com/activecm/rita/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+no%3Aassignee)
* Find an issue you would like to work on in the Github tracker, especially [unassigned issues marked "good first issue"](https://github.com/activecm/rita-legacy/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+no%3Aassignee)
* Leave a comment letting us know you would like to work on it
* Add new features:
* If you would like to become involved in the development effort, open a new issue or continue a discussion on an existing issue

### Running Static Tests
* You must have a RITA [development environment](https://github.com/activecm/rita/blob/master/docs/Manual%20Installation.md#installing-golang) set up and [golangci-lint](https://github.com/golangci/golangci-lint#install) installed to run the tests.
* Check the [Makefile](https://github.com/activecm/rita/blob/master/Makefile) for all options. Currently you can run `make test`, `make static-test`, and `make unit-test`. There is also `make integration-test` and docker variants that will require you install docker as well.
* You must have a RITA [development environment](https://github.com/activecm/rita-legacy/blob/master/docs/Manual%20Installation.md#installing-golang) set up and [golangci-lint](https://github.com/golangci/golangci-lint#install) installed to run the tests.
* Check the [Makefile](https://github.com/activecm/rita-legacy/blob/master/Makefile) for all options. Currently you can run `make test`, `make static-test`, and `make unit-test`. There is also `make integration-test` and docker variants that will require you install docker as well.

### Reviewing Automated Test Results
Automated tests are run against each pull request. Build results may be viewed [here](https://github.com/activecm/rita/actions).
Automated tests are run against each pull request. Build results may be viewed [here](https://github.com/activecm/rita-legacy/actions).

### Gittiquette Summary
* In order to contribute to RITA, you must [fork it](https://github.com/activecm/rita/fork).
* In order to contribute to RITA, you must [fork it](https://github.com/activecm/rita-legacy/fork).
* Once you have a forked repo you will need to clone it to a very specific path which corresponds to _the original repo location_. This is due to the way packages are imported in Go programs.
* `git clone [your forked repo git url]`
* Add `https://github.com/activecm/rita` as a new remote so you can pull new changes.
* `git remote add upstream https://github.com/activecm/rita`
* Add `https://github.com/activecm/rita-legacy` as a new remote so you can pull new changes.
* `git remote add upstream https://github.com/activecm/rita-legacy`
* Split a branch off of master .
* `git checkout -b [your new feature]`
* When your work is finished, pull the latest changes from the upstream master and rebase your changes on it.
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM golang:1.17-alpine as rita-builder

RUN apk add --no-cache git make ca-certificates wget build-base

WORKDIR /go/src/github.com/activecm/rita
WORKDIR /go/src/github.com/activecm/rita-legacy

# cache dependencies
COPY go.mod go.sum ./
Expand All @@ -24,7 +24,7 @@ RUN make CGO_ENABLED=$CGO_ENABLED GOARCH=$GOARCH GOOS=$GOOS
FROM scratch

WORKDIR /
COPY --from=rita-builder /go/src/github.com/activecm/rita/etc/rita_docker.yaml /etc/rita/config.yaml
COPY --from=rita-builder /go/src/github.com/activecm/rita/rita /rita
COPY --from=rita-builder /go/src/github.com/activecm/rita-legacy/etc/rita_docker.yaml /etc/rita/config.yaml
COPY --from=rita-builder /go/src/github.com/activecm/rita-legacy/rita /rita

ENTRYPOINT ["/rita"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ VERSION := $(shell git describe --abbrev=0 --tags)
EXACT_VERSION := $(shell git describe --always --long --dirty --tags)
PREFIX ?= /usr/local

LDFLAGS := -ldflags='-X github.com/activecm/rita/config.Version=${VERSION} -X github.com/activecm/rita/config.ExactVersion=${EXACT_VERSION}'
LDFLAGS := -ldflags='-X github.com/activecm/rita-legacy/config.Version=${VERSION} -X github.com/activecm/rita-legacy/config.ExactVersion=${EXACT_VERSION}'
TESTFLAGS := -p=1 -v
# go source files
SRC := $(shell find . -path ./vendor -prune -o -type f -name '*.go' -print)
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Please see our recommended [System Requirements](docs/System%20Requirements.md)

RITA provides an install script that works on Ubuntu 20.04 LTS, Debian 11, Security Onion, and CentOS 7.

Download the latest `install.sh` file [here](https://github.com/activecm/rita/releases/latest) and make it executable: `chmod +x ./install.sh`
Download the latest `install.sh` file [here](https://github.com/activecm/rita-legacy/releases/latest) and make it executable: `chmod +x ./install.sh`

Then choose one of the following install methods:

Expand Down
2 changes: 1 addition & 1 deletion commands/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package commands
import (
"fmt"

"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/resources"
"github.com/globalsign/mgo/bson"
"github.com/urfave/cli"
)
Expand Down
2 changes: 1 addition & 1 deletion commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package commands
import (
"runtime"

"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/resources"
log "github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
Expand Down
4 changes: 2 additions & 2 deletions commands/delete-database.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"regexp"
"strings"

"github.com/activecm/rita/resources"
"github.com/activecm/rita/util"
"github.com/activecm/rita-legacy/resources"
"github.com/activecm/rita-legacy/util"
"github.com/urfave/cli"
)

Expand Down
10 changes: 5 additions & 5 deletions commands/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"fmt"
"strings"

"github.com/activecm/rita/config"
"github.com/activecm/rita/parser"
"github.com/activecm/rita/pkg/remover"
"github.com/activecm/rita/resources"
"github.com/activecm/rita/util"
"github.com/activecm/rita-legacy/config"
"github.com/activecm/rita-legacy/parser"
"github.com/activecm/rita-legacy/pkg/remover"
"github.com/activecm/rita-legacy/resources"
"github.com/activecm/rita-legacy/util"
log "github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
Expand Down
2 changes: 1 addition & 1 deletion commands/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/activecm/rita/config"
"github.com/activecm/rita-legacy/config"
)

func TestParseFlags(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions commands/reporting.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package commands

import (
"github.com/activecm/rita/reporting"
"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/reporting"
"github.com/activecm/rita-legacy/resources"
"github.com/urfave/cli"
)

Expand Down
4 changes: 2 additions & 2 deletions commands/show-beacons-proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"strings"

"github.com/activecm/rita/pkg/beaconproxy"
"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/pkg/beaconproxy"
"github.com/activecm/rita-legacy/resources"
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli"
)
Expand Down
4 changes: 2 additions & 2 deletions commands/show-beacons-sni.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"strings"

"github.com/activecm/rita/pkg/beaconsni"
"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/pkg/beaconsni"
"github.com/activecm/rita-legacy/resources"
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli"
)
Expand Down
4 changes: 2 additions & 2 deletions commands/show-beacons.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"strings"

"github.com/activecm/rita/pkg/beacon"
"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/pkg/beacon"
"github.com/activecm/rita-legacy/resources"
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli"
)
Expand Down
4 changes: 2 additions & 2 deletions commands/show-bl-hostname.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strconv"
"strings"

"github.com/activecm/rita/pkg/blacklist"
"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/pkg/blacklist"
"github.com/activecm/rita-legacy/resources"
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli"
)
Expand Down
4 changes: 2 additions & 2 deletions commands/show-bl-ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strconv"
"strings"

"github.com/activecm/rita/pkg/blacklist"
"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/pkg/blacklist"
"github.com/activecm/rita-legacy/resources"
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli"
)
Expand Down
2 changes: 1 addition & 1 deletion commands/show-databases.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package commands
import (
"fmt"

"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/resources"
"github.com/urfave/cli"
)

Expand Down
6 changes: 3 additions & 3 deletions commands/show-dns-fqdn-ips.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"os"
"strings"

"github.com/activecm/rita/pkg/data"
"github.com/activecm/rita/pkg/hostname"
"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/pkg/data"
"github.com/activecm/rita-legacy/pkg/hostname"
"github.com/activecm/rita-legacy/resources"
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli"
)
Expand Down
4 changes: 2 additions & 2 deletions commands/show-explodedDns.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"strings"

"github.com/activecm/rita/pkg/explodeddns"
"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/pkg/explodeddns"
"github.com/activecm/rita-legacy/resources"
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli"
)
Expand Down
4 changes: 2 additions & 2 deletions commands/show-ip-dns-fqdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

"github.com/activecm/rita/pkg/hostname"
"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/pkg/hostname"
"github.com/activecm/rita-legacy/resources"
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli"
)
Expand Down
6 changes: 3 additions & 3 deletions commands/show-long-connections.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"strings"
"time"

"github.com/activecm/rita/pkg/uconn"
"github.com/activecm/rita/resources"
"github.com/activecm/rita/util"
"github.com/activecm/rita-legacy/pkg/uconn"
"github.com/activecm/rita-legacy/resources"
"github.com/activecm/rita-legacy/util"
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli"
)
Expand Down
4 changes: 2 additions & 2 deletions commands/show-open-connections.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"time"

"github.com/activecm/rita/pkg/uconn"
"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/pkg/uconn"
"github.com/activecm/rita-legacy/resources"
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli"
)
Expand Down
4 changes: 2 additions & 2 deletions commands/show-strobes.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"strings"

"github.com/activecm/rita/pkg/beacon"
"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/pkg/beacon"
"github.com/activecm/rita-legacy/resources"
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli"
)
Expand Down
4 changes: 2 additions & 2 deletions commands/show-user-agents.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"strings"

"github.com/activecm/rita/pkg/useragent"
"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/pkg/useragent"
"github.com/activecm/rita-legacy/resources"
"github.com/olekukonko/tablewriter"
"github.com/urfave/cli"
)
Expand Down
4 changes: 2 additions & 2 deletions commands/test-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

"github.com/activecm/rita/config"
"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/config"
"github.com/activecm/rita-legacy/resources"

"github.com/urfave/cli"
yaml "gopkg.in/yaml.v2"
Expand Down
14 changes: 7 additions & 7 deletions commands/update-check.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ import (
"strings"
"time"

"github.com/activecm/rita/config"
"github.com/activecm/rita/resources"
"github.com/activecm/rita-legacy/config"
"github.com/activecm/rita-legacy/resources"
"github.com/blang/semver"
"github.com/google/go-github/github"
log "github.com/sirupsen/logrus"
"github.com/urfave/cli"
)

//Strings used for informing the user of a new version.
var informFmtStr = "\nTheres a new %s version of RITA %s available at:\nhttps://github.com/activecm/rita/releases\n"
// Strings used for informing the user of a new version.
var informFmtStr = "\nTheres a new %s version of RITA %s available at:\nhttps://github.com/activecm/rita-legacy/releases\n"
var versions = []string{"Major", "Minor", "Patch"}

//GetVersionPrinter prints the version info
// GetVersionPrinter prints the version info
func GetVersionPrinter() func(*cli.Context) {
return func(c *cli.Context) {
fmt.Printf("%s version %s\n", c.App.Name, c.App.Version)
Expand All @@ -27,7 +27,7 @@ func GetVersionPrinter() func(*cli.Context) {
}

// UpdateCheck Performs a check for the new version of RITA against the git repository and
//returns a string indicating the new version if available
// returns a string indicating the new version if available
func updateCheck(configFile string) string {
res := resources.InitResources(configFile)
delta := res.Config.S.UserConfig.UpdateCheckFrequency
Expand Down Expand Up @@ -99,7 +99,7 @@ func getRemoteVersion() (semver.Version, error) {

// Assembles a notice for the user informing them of an upgrade.
// The return value is printed regardless so, "" is returned on errror.
//func informUser( verStr string, index int ) string {
// func informUser( verStr string, index int ) string {
func informUser(local semver.Version, remote semver.Version) string {
return fmt.Sprintf(informFmtStr,
versions[versionDiffIndex(remote, local)],
Expand Down
4 changes: 2 additions & 2 deletions config/running.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ func initRunningConfig(static *StaticCfg, running *RunningCfg) error {
if err != nil {
fmt.Println("\t[!] Version error: please ensure that you cloned the git repo and are using make to build.")
fmt.Println("\t[!] See the following resources for further information:")
fmt.Println("\t[>] https://github.com/activecm/rita/blob/master/Contributing.md#common-issues")
fmt.Println("\t[>] https://github.com/activecm/rita/blob/master/docs/Manual%20Installation.md")
fmt.Println("\t[>] https://github.com/activecm/rita-legacy/blob/master/Contributing.md#common-issues")
fmt.Println("\t[>] https://github.com/activecm/rita-legacy/blob/master/docs/Manual%20Installation.md")
}
return err
}
Loading

0 comments on commit 7db13b2

Please sign in to comment.