Skip to content

Commit

Permalink
idaholab#530, work in progress on netbox plugin installation
Browse files Browse the repository at this point in the history
  • Loading branch information
mmguero committed Aug 14, 2024
1 parent 8133de6 commit 29ae240
Show file tree
Hide file tree
Showing 12 changed files with 281 additions and 45 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ suricata-logs
netbox/netbox/media
netbox/netbox/postgres
netbox/netbox/redis
netbox/custom-plugins
zeek/custom
1 change: 1 addition & 0 deletions Dockerfiles/netbox.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ RUN export BINARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
procps \
psmisc \
python3-dev \
ripgrep \
rsync \
supervisor \
tini && \
Expand Down
8 changes: 7 additions & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ services:
bind:
create_host_path: false
source: ./netbox/config
target: /etc/netbox/config
target: /etc/netbox/config/configmap
read_only: true
- type: bind
bind:
Expand All @@ -1118,6 +1118,12 @@ services:
source: ./netbox/preload
target: /opt/netbox-preload/configmap
read_only: true
- type: bind
bind:
create_host_path: false
source: ./netbox/custom-plugins
target: /opt/netbox-custom-plugins
read_only: true
healthcheck:
test: ["CMD", "curl", "--silent", "http://localhost:8080/netbox/api/"]
interval: 60s
Expand Down
8 changes: 7 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ services:
bind:
create_host_path: false
source: ./netbox/config
target: /etc/netbox/config
target: /etc/netbox/config/configmap
read_only: true
- type: bind
bind:
Expand All @@ -992,6 +992,12 @@ services:
source: ./netbox/preload
target: /opt/netbox-preload/configmap
read_only: true
- type: bind
bind:
create_host_path: false
source: ./netbox/custom-plugins
target: /opt/netbox-custom-plugins
read_only: true
healthcheck:
test: ["CMD", "curl", "--silent", "http://localhost:8080/netbox/api/"]
interval: 60s
Expand Down
6 changes: 6 additions & 0 deletions docs/contributing-local-modifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,12 @@ services:
source: ./netbox/preload
target: /opt/netbox-preload/configmap
read_only: true
- type: bind
bind:
create_host_path: false
source: ./netbox/custom-plugins
target: /opt/netbox-custom-plugins
read_only: true
netbox-postgres:
volumes:
- type: bind
Expand Down
7 changes: 6 additions & 1 deletion docs/custom-rules.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# <a name="CustomRulesAndScripts"></a>Custom Rules and Scripts
# <a name="CustomRulesAndScripts"></a>Custom Rules, Scripts and Plugins

* [Suricata](#Suricata)
* [Zeek](#Zeek)
* [YARA](#YARA)
* [NetBox](#NetBox)
* [Other Customizations](#Other)

Much of Malcolm's behavior can be adjusted through [environment variable files](malcolm-config.md#MalcolmConfigEnvVars). However, some components allow further customization through the use of custom scripts, configuration files, and rules.
Expand Down Expand Up @@ -73,6 +74,10 @@ docker compose exec file-monitor supervisorctl restart yara

If the `EXTRACTED_FILE_YARA_CUSTOM_ONLY` [environment variable](malcolm-config.md#MalcolmConfigEnvVars) is set to `true`, Malcolm will bypass the default Yara rulesets ([Neo23x0/signature-base](https://github.com/Neo23x0/signature-base), [reversinglabs/reversinglabs-yara-rules](https://github.com/reversinglabs/reversinglabs-yara-rules), and [bartblaze/Yara-rules](https://github.com/bartblaze/Yara-rules)) and use only user-defined rules in `./yara/rules`.

## <a name="NetBox"></a>NetBox

TODO documentation

## <a name="Other"></a>Other Customizations

There are other areas of Malcolm that can be modified and customized to fit users' needs. Please see these other sections of the documentation for more information.
Expand Down
1 change: 1 addition & 0 deletions malcolm-iso/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ if [ -d "$WORKDIR" ]; then
mkdir -p "$MALCOLM_DEST_DIR/htadmin/"
mkdir -p "$MALCOLM_DEST_DIR/logstash/certs/"
mkdir -p "$MALCOLM_DEST_DIR/logstash/maps/"
mkdir -p "$MALCOLM_DEST_DIR/netbox/custom-plugins/requirements/"
mkdir -p "$MALCOLM_DEST_DIR/netbox/media/"
mkdir -p "$MALCOLM_DEST_DIR/netbox/postgres/"
mkdir -p "$MALCOLM_DEST_DIR/netbox/redis/"
Expand Down
3 changes: 3 additions & 0 deletions netbox/custom-plugins/requirements/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!.gitignore

Loading

0 comments on commit 29ae240

Please sign in to comment.