Skip to content

Commit

Permalink
lots of mods to support the addition of the rocky linux .notus files.
Browse files Browse the repository at this point in the history
  • Loading branch information
immauss committed Apr 24, 2024
1 parent e2f87f4 commit 1bb77f7
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ v1.0 | old out of date image for posterity. (Dont` use this one. . .
# Greenbone Versions in Latest image: #
Component | Version | | Component | Version
----------|----------|-|----------|---------
| gvmd | v23.5.1 | | gvm_libs | v22.9.0 |
| gvmd | v23.5.2 | | gvm_libs | v22.9.0 |
| openvas | v23.0.1 | | openvas_smb | v22.5.6 |
| notus_scanner | v22.6.2 | | gsa | v23.0.0 |
| gsad | v22.9.1 | | ospd | v21.4.4 |
Expand Down
2 changes: 2 additions & 0 deletions bin/base-rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,10 @@ fi
# First we build GSA using a single ovasbase x86_64 container.
# this SIGNIFICANTLY speeds the builds.
# first check to see if the current version has been built already

if ! [ -f tmp/build/$gsa.tar.gz ] || [ "x$GSABUILD" == "xtrue" ] ; then
echo "Starting container to build GSA"
docker pull immauss/ovasbase
docker run -it --rm \
-v $(pwd)/ics-gsa:/ics-gsa \
-v $(pwd)/tmp/build:/build \
Expand Down
10 changes: 4 additions & 6 deletions bin/refresh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Set start dir
WorkDir=$(pwd)
# Tag to work with. Normally latest but might be using new tag during upgrades.
TAG="latest"
TAG="beta"
SQLBU="${TAG}.base.sql"
TAR="${TAG}.var-lib.tar.xz"
VER=$(cat ver.current)
Expand All @@ -32,8 +32,6 @@ elif [ $SPACE -le 4 ]; then
echo "only ${SPACE}G of space on /var/lib/docker ... bailing out."
exit
fi


# Force a pull of the latest image.
docker pull immauss/openvas:$TAG
echo "Starting container for an update"
Expand Down Expand Up @@ -91,8 +89,8 @@ if [ $SQL_SIZE -le 2000 ] || [ $FEED_SIZE -le 2000 ]; then
logger -t db-refresh "SQL_SIZE = $SQL_SIZE : FEED_SIZE = $FEED_SIZE: Failing out"
exit
fi
cp latest.base.sql.xz /home/scott/Projects/openvas/base.sql.xz
cp latest.var-lib.tar.xz /home/scott/Projects/openvas/var-lib.tar.xz
cp $TAG.base.sql.xz /home/scott/Projects/openvas/base.sql.xz
cp $TAG.var-lib.tar.xz /home/scott/Projects/openvas/var-lib.tar.xz

# echo " Push updates to www"
# scp *.xz push@www.immauss.com:/var/www/html/drupal/openvas/
Expand All @@ -105,7 +103,7 @@ echo "Now rebuild the image"
cd $WorkDir
echo "$(pwd) Is current working directory."
date > update.ts
docker buildx build -f $DOCKERFILE --target final -t immauss/openvas:$TAG --platform linux/arm64,linux/amd64,linux/arm/v7 --push .
docker buildx build -f $DOCKERFILE --target final -t immauss/openvas:$TAG --platform linux/arm64,linux/amd64 --push .
if [ $? -ne 0 ]; then
echo "Build failed."
exit
Expand Down
2 changes: 1 addition & 1 deletion build.rc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gvmd=v23.5.1
gvmd=v23.5.2
gvm_libs=v22.9.0
openvas=v23.0.1
openvas_smb=v22.5.6
Expand Down
4 changes: 2 additions & 2 deletions scripts/single.sh
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,10 @@ if [ $SKIPSYNC == "false" ]; then
echo " Fine, ... we'll be quiet, but we warn you if there are errors"
echo " syncing the feeds, you'll miss them."
echo "Syncing all feeds from GB"
su -c "/usr/local/bin/greenbone-nvt-sync --type all --quiet" gvm
/scripts/sync.sh --quiet
else
echo "Syncing all feeds from GB"
su -c "/usr/local/bin/greenbone-nvt-sync --type all" gvm
/scripts/sync.sh
fi
# if the feed-sync fails, the container will exit and this will not be run.
rm /data/feed-syncing
Expand Down
24 changes: 13 additions & 11 deletions scripts/sync.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/usr/bin/env bash
echo " Pulling NVTs from greenbone"
su -c "/usr/local/bin/greenbone-nvt-sync" gvm
sleep 2
echo " Pulling scapdata from greenbone"
su -c "/usr/local/bin/greenbone-feed-sync --type SCAP" gvm
sleep 2
echo " Pulling cert-data from greenbone"
su -c "/usr/local/bin/greenbone-feed-sync --type CERT" gvm
sleep 2
echo " Pulling latest GVMD Data from Greenbone"
su -c "/usr/local/bin/greenbone-feed-sync --type GVMD_DATA " gvm
wait=2

# # Then pull the remaining feeds from the GB community feeds.
# for feed in nvt gvmd-data scap cert nasl report-format scan-config port-list; do
# echo "Synchronizing the $feed feed."
# /usr/local/bin/greenbone-feed-sync --type=$feed $1
# echo "Sleep for $wait seconds"
# sleep $wait
# done
# Sync the notus feed from the Immauss feed server.
echo "Synchronizing the Notus feed from Immauss Cybersecurity"
echo "And all others from the GB Community feed"
/usr/local/bin/greenbone-feed-sync --notus-url "rsync://rsync.immauss.com/feeds/notus/" --verbose
4 changes: 2 additions & 2 deletions testing/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- "REDISDBS=512" # number of Redis DBs to use
- "QUIET=false" # dump feed sync noise to /dev/null
- "NEWDB=false" # only use this for creating a blank DB
- "SKIPSYNC=true" # Skips the feed sync on startup.
- "SKIPSYNC=false" # Skips the feed sync on startup.
- "RESTORE=false" # This probably not be used from compose... see docs.
- "DEBUG=false" # This will cause the container to stop and not actually start gvmd
- "HTTPS=false" # wether to use HTTPS or not
Expand All @@ -21,7 +21,7 @@ services:
- NET_ADMIN # for capturing packages in promiscuous mode
- NET_RAW # for raw sockets e.g. used for the boreas alive detection
container_name: openvas
image: immauss/openvas:beta
image: immauss/openvas:22.4.44
scannable-ubuntu:
container_name: ubuntu
image: immauss/scannable
Expand Down
2 changes: 1 addition & 1 deletion update.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Wed Mar 20 02:30:28 UTC 2024
Wed Apr 24 19:12:21 UTC 2024
2 changes: 1 addition & 1 deletion versions.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Greenbone Versions in Latest image: #
Component | Version | | Component | Version
----------|----------|-|----------|---------
| gvmd | v23.5.1 | | gvm_libs | v22.9.0 |
| gvmd | v23.5.2 | | gvm_libs | v22.9.0 |
| openvas | v23.0.1 | | openvas_smb | v22.5.6 |
| notus_scanner | v22.6.2 | | gsa | v23.0.0 |
| gsad | v22.9.1 | | ospd | v21.4.4 |
Expand Down

0 comments on commit 1bb77f7

Please sign in to comment.