Skip to content

Commit

Permalink
Merge pull request #123 from Security-Onion-Solutions/dev
Browse files Browse the repository at this point in the history
2.3.130
  • Loading branch information
jertel authored Jun 7, 2022
2 parents 2bf8adf + 9cc88b6 commit 961500b
Show file tree
Hide file tree
Showing 89 changed files with 8,623 additions and 10,311 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ jobs/
nsm/
.vscode/
.DS_Store

# Pytest output
__pycache__
.pytest_cache
.coverage
*.pyc
17 changes: 9 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,24 @@

FROM ghcr.io/security-onion-solutions/golang:alpine as builder
ARG VERSION=0.0.0
RUN apk update && apk add libpcap-dev bash git musl-dev gcc npm
RUN apk update && apk add libpcap-dev bash git musl-dev gcc npm python3 py3-pip
COPY . /build
WORKDIR /build
RUN npm install jest --global
RUN npm install jest jest-environment-jsdom --global
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN ./build.sh "$VERSION"

FROM ghcr.io/security-onion-solutions/alpine:latest
FROM ghcr.io/security-onion-solutions/python:3-slim

ARG UID=939
ARG GID=939
ARG VERSION=0.0.0
ARG ELASTIC_VERSION=0.0.0
ARG WAZUH_VERSION=0.0.0

RUN apk update && apk add tzdata ca-certificates curl tcpdump && update-ca-certificates
RUN apt update -y && apt install -y bash tzdata ca-certificates wget curl tcpdump unzip && update-ca-certificates
RUN addgroup --gid "$GID" socore
RUN adduser -D -u "$UID" -G socore -g '' socore
RUN adduser --disabled-password --uid "$UID" --ingroup socore --gecos '' socore
RUN mkdir -p /opt/sensoroni/jobs && chown socore:socore /opt/sensoroni/jobs
RUN mkdir -p /opt/sensoroni/logs && chown socore:socore /opt/sensoroni/logs
WORKDIR /opt/sensoroni
Expand All @@ -43,7 +44,7 @@ RUN chmod u+x scripts/*
RUN chown 939:939 scripts/*
RUN find . -name \*.html -exec sed -i -e "s/VERSION_PLACEHOLDER/$VERSION/g" {} \;

RUN [[ $ELASTIC_VERSION == '0.0.0' ]] || \
RUN bash -c "[[ $ELASTIC_VERSION == '0.0.0' ]]" || \
(mkdir -p html/downloads && \
wget https://artifacts.elastic.co/downloads/beats/winlogbeat/winlogbeat-oss-$(echo $ELASTIC_VERSION)-windows-x86_64.msi -P html/downloads/ && \
wget https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-oss-$(echo $ELASTIC_VERSION)-x86_64.rpm -P html/downloads/ && \
Expand All @@ -53,14 +54,14 @@ RUN [[ $ELASTIC_VERSION == '0.0.0' ]] || \
wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-oss-$(echo $ELASTIC_VERSION)-amd64.deb -P html/downloads/ && \
wget https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-oss-$(echo $ELASTIC_VERSION)-amd64.deb -P html/downloads/)

RUN [[ $WAZUH_VERSION == '0.0.0' ]] || \
RUN bash -c "[[ $WAZUH_VERSION == '0.0.0' ]]" || \
(mkdir -p html/downloads && \
wget https://packages.wazuh.com/3.x/osx/wazuh-agent-$(echo $WAZUH_VERSION).pkg -P html/downloads/ && \
wget https://packages.wazuh.com/3.x/yum/wazuh-agent-$(echo $WAZUH_VERSION).x86_64.rpm -P html/downloads/ && \
wget https://packages.wazuh.com/3.x/apt/pool/main/w/wazuh-agent/wazuh-agent_$(echo $WAZUH_VERSION)_amd64.deb -P html/downloads/ && \
wget https://packages.wazuh.com/3.x/windows/wazuh-agent-$(echo $WAZUH_VERSION).msi -P html/downloads/)

RUN [[ $VERSION == '0.0.0' ]] || \
RUN bash -c "[[ $VERSION == '0.0.0' ]]" || \
(wget https://docs.securityonion.net/_/downloads/en/$(echo $VERSION | cut -d'.' -f 1,2)/htmlzip/ -O /tmp/docs.zip && \
unzip -o /tmp/docs.zip -d html/docs && \
rm -f /tmp/docs.zip && \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.kratos
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
FROM ghcr.io/security-onion-solutions/golang:alpine AS builder

ARG OWNER=ory
ARG VERSION=v0.8.2-alpha.1
ARG VERSION=v0.9.0-alpha.3

RUN addgroup -S ory; \
adduser -S ory -G ory -D -H -s /bin/nologin
Expand Down
2 changes: 1 addition & 1 deletion agent/jobmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (mgr *JobManager) Start() {
defer reader.Close()
err = mgr.StreamJobResults(job, reader)
} else {
log.WithField("jobId", job.Id).Info("Job completed without stream result")
log.WithField("jobId", job.Id).Debug("Job completed without stream result")
}
}
if err == nil {
Expand Down
Loading

0 comments on commit 961500b

Please sign in to comment.