Update repository references

Co-Authored-By: Liza Tsibur <liza@activecountermeasures.com>
This commit is contained in:
Naomi Kramer
2024-06-28 00:37:10 -04:00
parent 906f53b3e5
commit 39212b9736
9 changed files with 16 additions and 53 deletions
-30
View File
@@ -4,38 +4,8 @@
CLICKHOUSE_VERSION=24.1.6
BUILDPLATFORM=linux/arm64
LOGS=./test_data
# TODO change this from loggies
APP_LOGS=./loggies
CONFIG_DIR=./deployment
CONFIG_FILE=./config.hjson
SYSLOG_ADDRESS=localhost:514
DB_ADDRESS=localhost:9000
# docker compose build --env-file .env.production
# cp ./.env.production /opt/rita/.env
# ---
# - name: Example playbook for Ubuntu
# hosts: default
# become: true
# tasks:
# - name: Create a directory if it does not exist
# ansible.builtin.file:
# path: /etc/rita
# state: directory
# mode: '0644'
# - name: Another symbolic mode example, adding some permissions and removing others
# ansible.builtin.copy:
# src: ~/repos/rita-v2/.env.production
# dest: /etc/rita/.env
# owner: root
# group: root
# mode: u+rw,g-wx,o-rwx
# - name: Another symbolic mode example, adding some permissions and removing others
# ansible.builtin.copy:
# src: ~/repos/rita-v2/deployment/*
# dest: /etc/rita
# owner: root
# group: root
# mode: u+rw,g-wx,o-rwx
+1 -1
View File
@@ -27,7 +27,7 @@ jobs:
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/activecm/rita-v2
ghcr.io/activecm/rita
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
+1 -1
View File
@@ -4,7 +4,7 @@ networks:
rita-network: {}
services:
rita:
image: ghcr.io/activecm/rita-v2:latest
image: ghcr.io/activecm/rita:latest
build: .
depends_on:
- clickhouse
+2 -2
View File
@@ -1,5 +1,5 @@
# local test script to build RITA as an amd64 Docker image and export it to a file
VERSION=$(git describe --always --abbrev=0 --tags)
sudo docker buildx build --platform linux/amd64 --tag ghcr.io/activecm/rita-v2:"$VERSION" ../
docker save -o rita-v2-"$VERSION"-image.tar ghcr.io/activecm/rita-v2:"$VERSION"
sudo docker buildx build --platform linux/amd64 --tag ghcr.io/activecm/rita:"$VERSION" ../
docker save -o rita-"$VERSION"-image.tar ghcr.io/activecm/rita:"$VERSION"
+4 -4
View File
@@ -67,7 +67,7 @@ cp ../README.md "$INSTALL_OPT"/README
if [ "$(uname)" == "Darwin" ]; then
sed -i'.bak' "s/REPLACE_ME/${VERSION}/g" "$BASE_DIR/install_rita.yml" # WAS $ANSIBLE_PLAYBOOKS
sed -i'.bak' "s/REPLACE_ME/${VERSION}/g" "$BASE_DIR/install_rita.sh"
sed -i'.bak' "s#ghcr.io/activecm/rita-v2:latest#ghcr.io/activecm/rita-v2:${VERSION}#g" "$INSTALL_OPT/docker-compose.yml"
sed -i'.bak' "s#ghcr.io/activecm/rita:latest#ghcr.io/activecm/rita:${VERSION}#g" "$INSTALL_OPT/docker-compose.yml"
rm "$BASE_DIR/install_rita.yml.bak"
rm "$BASE_DIR/install_rita.sh.bak"
@@ -75,7 +75,7 @@ if [ "$(uname)" == "Darwin" ]; then
else
sed -i "s/REPLACE_ME/${VERSION}/g" "$BASE_DIR/install_rita.yml" # WAS $ANSIBLE_PLAYBOOKS
sed -i "s/REPLACE_ME/${VERSION}/g" "$BASE_DIR/install_rita.sh"
sed -i "s#ghcr.io/activecm/rita-v2:latest#ghcr.io/activecm/rita-v2:${VERSION}#g" "$INSTALL_OPT/docker-compose.yml"
sed -i "s#ghcr.io/activecm/rita:latest#ghcr.io/activecm/rita:${VERSION}#g" "$INSTALL_OPT/docker-compose.yml"
fi
@@ -83,8 +83,8 @@ fi
# TODO remove when repo is public
./build_image.sh
cp "./rita-v2-$VERSION-image.tar" "$ANSIBLE_FILES" # was $INSTALL_OPT
rm "./rita-v2-$VERSION-image.tar"
cp "./rita-$VERSION-image.tar" "$ANSIBLE_FILES" # was $INSTALL_OPT
rm "./rita-$VERSION-image.tar"
# create tar
# TODO the inner folder is named stage, should be rita-$VERSION
+4 -8
View File
@@ -23,11 +23,8 @@
become: true
vars:
rita_version: "REPLACE_ME" #FIXME - replace with the right version
#rita_container_image: hello-world # Test container to confirm that we can install images.
#rita_container_image: activecm/rita # Confirm exact image name to pull
#rita_container_image: activecm/rita:4.3.1
rita_container_image: "ghcr.io/activecm/rita-v2:{{ rita_version }}"
rita_version: "REPLACE_ME"
rita_container_image: "ghcr.io/activecm/rita:{{ rita_version }}"
clickhouse_container_image: clickhouse/clickhouse-server:latest
ansible_python_interpreter: /bin/python3 # Centos 7 defaults to using python2, so we force python 3. This change does not break any other distros
@@ -510,15 +507,14 @@
rescue:
- name: "RITA Install: Transfer RITA container image to target system"
copy:
# TODO remove -v2
src: "rita-v2-{{ rita_version }}-image.tar"
src: "rita-{{ rita_version }}-image.tar"
dest: /opt/rita
owner: root
group: root
mode: 0644
- name: "Install {{ rita_container_name }} container image from file"
community.docker.docker_image_load:
path: "/opt/rita/rita-v2-{{ rita_version }}-image.tar"
path: "/opt/rita/rita-{{ rita_version }}-image.tar"
register: load_result
#This final one prints a list of the loaded images if we use the above 2 stanzas to load from a file.
- name: "RITA Install: Print loaded image names."
+2 -2
View File
@@ -25,8 +25,8 @@ fi
[ -d /etc/rita/threat_intel_feeds ] || { echo >&2 "/threat_intel_feeds should be in /etc/rita"; exit 1; }
# verify that sed worked during installer generation
if [ "$(grep -c "image: ghcr.io/activecm/rita-v2:${VERSION}" /opt/rita/docker-compose.yml)" -ne 1 ]; then
echo "/opt/rita/docker-compose.yml should have ghcr.io/activecm/rita-v2:${VERSION} set as the image definition for the rita service."
if [ "$(grep -c "image: ghcr.io/activecm/rita:${VERSION}" /opt/rita/docker-compose.yml)" -ne 1 ]; then
echo "/opt/rita/docker-compose.yml should have ghcr.io/activecm/rita:${VERSION} set as the image definition for the rita service."
exit 1
fi
+1 -1
View File
@@ -34,7 +34,7 @@ logType='tsv'
# dst='165.227.216.194'
# path = './test_data/proxy'
path = '/Users/lisa/Desktop/go_ws/rita-v2/test_data/valid_tsv'
path = './test_data/valid_tsv'
# path = '/home/parallels/Desktop/chris/dnscat2-ja3-strobe-agent'
order = ['ts','uid','id.orig_h','id.orig_p','id.resp_h','id.resp_p','proto','service','duration','orig_bytes','resp_bytes','conn_state','local_orig','local_resp','missed_bytes','history','orig_pkts','orig_ip_bytes','resp_pkts','resp_ip_bytes','tunnel_parents','agent_hostname','agent_uuid']
# size = 'multiple'
+1 -4
View File
@@ -81,11 +81,8 @@ func (it *ThreatIntelSuite) TestFileFeeds() {
checkThreatIntel(t, db)
}
// TODO check this test works once repo is public
func (it *ThreatIntelSuite) TestOnlineFeeds() {
t := it.T()
// TODO remove
t.SkipNow()
dbName := "threat_intel_online_feed"
// Get current commit hash
@@ -96,7 +93,7 @@ func (it *ThreatIntelSuite) TestOnlineFeeds() {
require.NotEmpty(t, commitHash)
// Get online feed by pulling the file feed from Github
feedURL := "https://github.com/activecm/rita-v2/blob/" + commitHash + "/integration/threat_intel_feeds/feed.txt"
feedURL := "https://github.com/activecm/rita/blob/" + commitHash + "/integration/threat_intel_feeds/feed.txt"
// set up file system interface
afs := afero.NewMemMapFs()