-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v24.08.0_merge_cisagov' of https://github.com/cisagov/M…
- Loading branch information
Showing
95 changed files
with
1,483 additions
and
660 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,5 @@ suricata-logs | |
netbox/netbox/media | ||
netbox/netbox/postgres | ||
netbox/netbox/redis | ||
netbox/custom-plugins | ||
zeek/custom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
ARG TARGETPLATFORM=linux/amd64 | ||
|
||
FROM --platform=${TARGETPLATFORM} alpine:3.20 | ||
FROM --platform=${TARGETPLATFORM} debian:12-slim | ||
|
||
# Copyright (c) 2020 Battelle Energy Alliance, LLC. All rights reserved. | ||
LABEL maintainer="[email protected]" | ||
|
@@ -60,17 +60,26 @@ COPY --chmod=755 shared/bin/opensearch_read_only.py /data/ | |
ADD scripts/malcolm_utils.py /data/ | ||
|
||
RUN export BINARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/') && \ | ||
apk update --no-cache && \ | ||
apk upgrade --no-cache && \ | ||
apk --no-cache add bash python3 py3-pip curl openssl procps psmisc moreutils npm rsync shadow jq tini && \ | ||
npm install -g http-server && \ | ||
apt-get -q update && \ | ||
apt-get -y -q --no-install-recommends upgrade && \ | ||
apt-get -y -q --allow-downgrades --allow-remove-essential --allow-change-held-packages install --no-install-recommends \ | ||
bash \ | ||
curl \ | ||
jq \ | ||
moreutils \ | ||
openssl \ | ||
procps \ | ||
psmisc \ | ||
python3 \ | ||
python3-pip \ | ||
rsync \ | ||
tini && \ | ||
pip3 install --break-system-packages supervisor humanfriendly requests && \ | ||
curl -fsSL -o /usr/local/bin/supercronic "${SUPERCRONIC_URL}${BINARCH}" && \ | ||
chmod +x /usr/local/bin/supercronic && \ | ||
addgroup -g ${DEFAULT_GID} ${PGROUP} ; \ | ||
adduser -D -H -u ${DEFAULT_UID} -h /nonexistant -s /sbin/nologin -G ${PGROUP} -g ${PUSER} ${PUSER} ; \ | ||
addgroup ${PUSER} tty ; \ | ||
addgroup ${PUSER} shadow ; \ | ||
groupadd --gid ${DEFAULT_GID} ${PUSER} && \ | ||
useradd -M --uid ${DEFAULT_UID} --gid ${DEFAULT_GID} -d /nonexistant -s /sbin/nologin ${PUSER} && \ | ||
usermod -a -G tty ${PUSER} && \ | ||
mkdir -p /data/init /opt/ecs && \ | ||
cd /opt && \ | ||
curl -sSL "$(curl -sSL "$ECS_RELEASES_URL" | jq '.tarball_url' | tr -d '"')" | tar xzf - -C ./ecs --strip-components 1 && \ | ||
|
@@ -93,17 +102,17 @@ RUN export BINARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/') | |
/opt/templates && \ | ||
chmod 755 /data/*.sh /data/*.py /data/init && \ | ||
chmod 400 /opt/maps/* && \ | ||
(echo -e "*/2 * * * * /data/shared-object-creation.sh\n0 10 * * * /data/index-refresh.py --index MALCOLM_NETWORK_INDEX_PATTERN --template malcolm_template --unassigned\n30 */2 * * * /data/index-refresh.py --index MALCOLM_OTHER_INDEX_PATTERN --template malcolm_beats_template --unassigned\n*/20 * * * * /data/opensearch_index_size_prune.py" > ${SUPERCRONIC_CRONTAB}) | ||
(echo "*/2 * * * * /data/shared-object-creation.sh\n0 10 * * * /data/index-refresh.py --index MALCOLM_NETWORK_INDEX_PATTERN --template malcolm_template --unassigned\n30 */2 * * * /data/index-refresh.py --index MALCOLM_OTHER_INDEX_PATTERN --template malcolm_beats_template --unassigned\n*/20 * * * * /data/opensearch_index_size_prune.py" > ${SUPERCRONIC_CRONTAB}) | ||
EXPOSE $OFFLINE_REGION_MAPS_PORT | ||
ENTRYPOINT ["/sbin/tini", \ | ||
ENTRYPOINT ["/usr/bin/tini", \ | ||
"--", \ | ||
"/usr/local/bin/docker-uid-gid-setup.sh", \ | ||
"/usr/local/bin/service_check_passthrough.sh", \ | ||
"-s", "dashboards-helper"] | ||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf", "-n"] | ||
CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf", "-n"] | ||
VOLUME ["/data/init"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
ARG TARGETPLATFORM=linux/amd64 | ||
|
||
FROM --platform=${TARGETPLATFORM} opensearchproject/opensearch-dashboards:2.15.0 | ||
FROM --platform=${TARGETPLATFORM} opensearchproject/opensearch-dashboards:2.16.0 | ||
|
||
LABEL maintainer="[email protected]" | ||
LABEL org.opencontainers.image.authors='[email protected]' | ||
|
@@ -43,10 +43,10 @@ RUN export BINARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/') | |
# Malcolm manages authentication and encryption via NGINX reverse proxy | ||
/usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin remove securityDashboards --allow-root && \ | ||
cd /tmp && \ | ||
# unzip transformVis.zip opensearch-dashboards/transformVis/opensearch_dashboards.json opensearch-dashboards/transformVis/package.json && \ | ||
# sed -i "s/2\.13\.0/2\.15\.0/g" opensearch-dashboards/transformVis/opensearch_dashboards.json && \ | ||
# sed -i "s/2\.13\.0/2\.15\.0/g" opensearch-dashboards/transformVis/package.json && \ | ||
# zip transformVis.zip opensearch-dashboards/transformVis/opensearch_dashboards.json opensearch-dashboards/transformVis/package.json && \ | ||
unzip transformVis.zip opensearch-dashboards/transformVis/opensearch_dashboards.json opensearch-dashboards/transformVis/package.json && \ | ||
sed -i "s/2\.15\.0/2\.16\.0/g" opensearch-dashboards/transformVis/opensearch_dashboards.json && \ | ||
sed -i "s/2\.15\.0/2\.16\.0/g" opensearch-dashboards/transformVis/package.json && \ | ||
zip transformVis.zip opensearch-dashboards/transformVis/opensearch_dashboards.json opensearch-dashboards/transformVis/package.json && \ | ||
cd /usr/share/opensearch-dashboards/plugins && \ | ||
/usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin install file:///tmp/transformVis.zip --allow-root && \ | ||
rm -rf /tmp/transformVis /tmp/opensearch-dashboards && \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
ARG TARGETPLATFORM=linux/amd64 | ||
|
||
FROM --platform=${TARGETPLATFORM} docker.elastic.co/beats/filebeat-oss:8.14.3 | ||
FROM --platform=${TARGETPLATFORM} docker.elastic.co/beats/filebeat-oss:8.15.0 | ||
|
||
# Copyright (c) 2024 Battelle Energy Alliance, LLC. All rights reserved. | ||
LABEL maintainer="[email protected]" | ||
|
@@ -66,10 +66,10 @@ ENV SUPERCRONIC_VERSION "0.2.30" | |
ENV SUPERCRONIC_URL "https://github.com/aptible/supercronic/releases/download/v$SUPERCRONIC_VERSION/supercronic-linux-" | ||
ENV SUPERCRONIC_CRONTAB "/etc/crontab" | ||
|
||
ENV YQ_VERSION "4.44.2" | ||
ENV YQ_VERSION "4.44.3" | ||
ENV YQ_URL "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_" | ||
|
||
ENV EVTX_VERSION "0.8.2" | ||
ENV EVTX_VERSION "0.8.3" | ||
ENV EVTX_URL "https://github.com/omerbenamram/evtx/releases/download/v${EVTX_VERSION}/evtx_dump-v${EVTX_VERSION}-XXX-unknown-linux-gnu" | ||
|
||
USER root | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
ARG TARGETPLATFORM=linux/amd64 | ||
|
||
FROM --platform=${TARGETPLATFORM} docker.elastic.co/logstash/logstash-oss:8.14.3 | ||
FROM --platform=${TARGETPLATFORM} docker.elastic.co/logstash/logstash-oss:8.15.0 | ||
|
||
LABEL maintainer="[email protected]" | ||
LABEL org.opencontainers.image.authors='[email protected]' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
ARG TARGETPLATFORM=linux/amd64 | ||
|
||
FROM --platform=${TARGETPLATFORM} netboxcommunity/netbox:v4.0.8 | ||
FROM --platform=${TARGETPLATFORM} netboxcommunity/netbox:v4.0.9 | ||
|
||
# Copyright (c) 2024 Battelle Energy Alliance, LLC. All rights reserved. | ||
LABEL maintainer="[email protected]" | ||
|
@@ -32,7 +32,7 @@ ENV SUPERCRONIC_CRONTAB "/etc/crontab" | |
|
||
ENV NETBOX_INITIALIZERS_VERSION "50d077d" | ||
|
||
ENV YQ_VERSION "4.44.2" | ||
ENV YQ_VERSION "4.44.3" | ||
ENV YQ_URL "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_" | ||
|
||
ENV NETBOX_DEVICETYPE_LIBRARY_IMPORT_URL "https://codeload.github.com/netbox-community/Device-Type-Library-Import/tar.gz/develop" | ||
|
@@ -43,13 +43,16 @@ ARG NETBOX_DEVICETYPE_LIBRARY_IMPORT_PATH="/opt/netbox-devicetype-library-import | |
ARG NETBOX_DEFAULT_SITE=Malcolm | ||
ARG NETBOX_CRON=true | ||
ARG NETBOX_PRELOAD_PATH="/opt/netbox-preload" | ||
ARG NETBOX_CUSTOM_PLUGINS_PATH="/opt/netbox-custom-plugins" | ||
ARG NETBOX_CONFIG_PATH="/etc/netbox/config" | ||
|
||
ENV NETBOX_PATH /opt/netbox | ||
ENV BASE_PATH netbox | ||
ENV NETBOX_DEVICETYPE_LIBRARY_IMPORT_PATH $NETBOX_DEVICETYPE_LIBRARY_IMPORT_PATH | ||
ENV NETBOX_DEFAULT_SITE $NETBOX_DEFAULT_SITE | ||
ENV NETBOX_CRON $NETBOX_CRON | ||
ENV NETBOX_PRELOAD_PATH $NETBOX_PRELOAD_PATH | ||
ENV NETBOX_CUSTOM_PLUGINS_PATH $NETBOX_CUSTOM_PLUGINS_PATH | ||
ENV NETBOX_CONFIG_PATH $NETBOX_CONFIG_PATH | ||
|
||
ADD netbox/patch/* /tmp/netbox-patches/ | ||
|
||
|
@@ -76,6 +79,7 @@ RUN export BINARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/') | |
procps \ | ||
psmisc \ | ||
python3-dev \ | ||
ripgrep \ | ||
rsync \ | ||
supervisor \ | ||
tini && \ | ||
|
@@ -115,15 +119,15 @@ RUN export BINARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/') | |
"Django>=4.2.10,<5" \ | ||
paramiko \ | ||
pillow && \ | ||
mkdir -p "${NETBOX_PATH}/netbox/${BASE_PATH}" && \ | ||
mv "${NETBOX_PATH}/netbox/static" "${NETBOX_PATH}/netbox/${BASE_PATH}/static" && \ | ||
jq '. += { "settings": { "http": { "discard_unsafe_fields": false } } }' /etc/unit/nginx-unit.json | jq 'del(.listeners."[::]:8080")' | jq 'del(.listeners."[::]:8081")' | jq ".routes.main[0].match.uri = \"/${BASE_PATH}/static/*\"" > /etc/unit/nginx-unit-new.json && \ | ||
mkdir -p "${NETBOX_PATH}/netbox/netbox" "${NETBOX_CUSTOM_PLUGINS_PATH}/requirements" && \ | ||
jq '. += { "settings": { "http": { "discard_unsafe_fields": false } } }' /etc/unit/nginx-unit.json | jq 'del(.listeners."[::]:8080")' | jq 'del(.listeners."[::]:8081")' | jq '.routes.main[0].action.share = "`/opt/netbox/netbox${uri.substring(7)}`"' | jq '.routes.main[0].match.uri = "/netbox/static/*"' | jq '.routes.status[0].match.uri = "/netbox/status/*"' > /etc/unit/nginx-unit-new.json && \ | ||
mv /etc/unit/nginx-unit-new.json /etc/unit/nginx-unit.json && \ | ||
chmod 644 /etc/unit/nginx-unit.json && \ | ||
tr -cd '\11\12\15\40-\176' < "${NETBOX_PATH}/netbox/${BASE_PATH}/configuration.py" > "${NETBOX_PATH}/netbox/${BASE_PATH}/configuration_ascii.py" && \ | ||
mv "${NETBOX_PATH}/netbox/${BASE_PATH}/configuration_ascii.py" "${NETBOX_PATH}/netbox/${BASE_PATH}/configuration.py" && \ | ||
sed -i "s/\('CENSUS_REPORTING_ENABLED',[[:space:]]*\)True/\1False/" "${NETBOX_PATH}/netbox/${BASE_PATH}/settings.py" && \ | ||
sed -i -E 's@^([[:space:]]*\-\-(state|tmp))([[:space:]])@\1dir\3@g' "${NETBOX_PATH}/launch-netbox.sh" | ||
tr -cd '\11\12\15\40-\176' < "${NETBOX_PATH}/netbox/netbox/configuration.py" > "${NETBOX_PATH}/netbox/netbox/configuration_ascii.py" && \ | ||
mv "${NETBOX_PATH}/netbox/netbox/configuration_ascii.py" "${NETBOX_PATH}/netbox/netbox/configuration.py" && \ | ||
sed -i "s/\('CENSUS_REPORTING_ENABLED',[[:space:]]*\)True/\1False/" "${NETBOX_PATH}/netbox/netbox/settings.py" && \ | ||
sed -i -E 's@^([[:space:]]*\-\-(state|tmp))([[:space:]])@\1dir\3@g' "${NETBOX_PATH}/launch-netbox.sh" && \ | ||
sed -i '/\/opt\/netbox\/venv\/bin\/activate/a \\n# Install custom plugins \npython3 /usr/local/bin/netbox_install_plugins.py' /opt/netbox/docker-entrypoint.sh | ||
|
||
COPY --chmod=755 shared/bin/docker-uid-gid-setup.sh /usr/local/bin/ | ||
COPY --chmod=755 shared/bin/service_check_passthrough.sh /usr/local/bin/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
ARG TARGETPLATFORM=linux/amd64 | ||
|
||
FROM --platform=${TARGETPLATFORM} opensearchproject/opensearch:2.15.0 | ||
FROM --platform=${TARGETPLATFORM} opensearchproject/opensearch:2.16.0 | ||
|
||
# Copyright (c) 2024 Battelle Energy Alliance, LLC. All rights reserved. | ||
LABEL maintainer="[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.