6 Commits

Author SHA1 Message Date
Peter Dave Hello cf05bf2003 Merge e1b29f94e4 into d62e4cd80c 2023-10-23 16:43:04 +00:00
Peter Dave Hello e1b29f94e4 Properly upgrade packages and clean up apt cache in Dockerfile
Result:
```
REPOSITORY     TAG       IMAGE ID       CREATED              SIZE
ssh-audit      after     03e247aee0cc   About a minute ago   131MB
ssh-audit      before    609962ceafb1   About a minute ago   150MB
```
2023-10-24 00:39:40 +08:00
Joe Testa d62e4cd80c Added Python 3.12 to Tox tests. 2023-10-22 16:43:04 -04:00
Joe Testa 2809ff464a Added --rm to docker run commands so stopped containers are automatically removed. 2023-09-12 08:38:07 -04:00
Joe Testa 02ab487232 Bumped version to v3.1.0-dev. 2023-09-07 08:57:59 -04:00
Joe Testa d62acd688e Updated Docker Makefile and packaging instructions. 2023-09-07 08:57:39 -04:00
9 changed files with 25 additions and 28 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", 3.11]
python-version: [3.7, 3.8, 3.9, "3.10", 3.11, 3.12]
steps:
- uses: actions/checkout@v2
+1 -1
View File
@@ -3,7 +3,7 @@ FROM python:3-slim
WORKDIR /
# Update the image to remediate any vulnerabilities.
RUN apt clean && apt update && apt -y dist-upgrade && apt clean
RUN apt update && apt -y upgrade && apt -y dist-upgrade && rm -rf /var/lib/apt/lists/*
# Remove suid & sgid bits from all files.
RUN find / -xdev -perm /6000 -exec chmod ug-s {} \; 2> /dev/null || true
-7
View File
@@ -4,13 +4,6 @@ ifeq ($(VERSION),)
endif
all:
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--tag positronsecurity/ssh-audit:${VERSION} \
--tag positronsecurity/ssh-audit:latest \
.
local-build:
docker build -t positronsecurity/ssh-audit:${VERSION} .
upload:
+3 -3
View File
@@ -18,7 +18,7 @@ An executable can only be made on a Windows host because the PyInstaller tool (h
To create package and upload to test server:
```
$ sudo apt install python3-virtualenv python3.8-venv
$ sudo apt install python3-virtualenv python3.10-venv
$ make -f Makefile.pypi
$ make -f Makefile.pypi uploadtest
```
@@ -67,13 +67,13 @@ Upload the snap with:
# Docker
Build image with:
Build a local image with:
```
$ make -f Makefile.docker
```
Then upload it to Dockerhub with:
Create a multi-architecture build and upload it to Dockerhub with:
```
$ make -f Makefile.docker upload
+4 -1
View File
@@ -32,7 +32,7 @@
- historical information from OpenSSH, Dropbear SSH and libssh;
- policy scans to ensure adherence to a hardened/standard configuration;
- runs on Linux and Windows;
- supports Python 3.7 - 3.11;
- supports Python 3.7 - 3.12;
- no dependencies
## Usage
@@ -178,6 +178,9 @@ For convenience, a web front-end on top of the command-line tool is available at
## ChangeLog
### v3.1.0-dev (???)
- Added Python 3.12 to Tox tests.
### v3.0.0 (2023-09-07)
- Results from concurrent scans against multiple hosts are no longer improperly combined; bug discovered by [Adam Russell](https://github.com/thecliguy).
- Hostname resolution failure no longer causes scans against multiple hosts to terminate unexpectedly; credit [Dani Cuesta](https://github.com/daniel-cues).
+4 -4
View File
@@ -456,9 +456,9 @@ run_test() {
test_name="TinySSH ${version} ${test_number}"
fi
cid=$(docker run -d -p 2222:22 "${IMAGE_NAME}:${IMAGE_VERSION}" ${server_exec})
#echo "Running: docker run --rm -d -p 2222:22 $IMAGE_NAME:$IMAGE_VERSION ${server_exec}"
cid=$(docker run --rm -d -p 2222:22 "${IMAGE_NAME}:${IMAGE_VERSION}" ${server_exec})
retval=$?
#echo "Running: docker run -d -p 2222:22 $IMAGE_NAME:$IMAGE_VERSION ${server_exec}"
if [[ ${retval} != 0 ]]; then
echo -e "${REDB}Failed to run docker image! (exit code: ${retval})${CLR}"
exit 1
@@ -603,8 +603,8 @@ run_policy_test() {
expected_exit_code=$6
#echo "Running: docker run -d -p 2222:22 $IMAGE_NAME:$IMAGE_VERSION ${server_exec}"
cid=$(docker run -d -p 2222:22 "${IMAGE_NAME}:${IMAGE_VERSION}" ${server_exec})
#echo "Running: docker run --rm -d -p 2222:22 $IMAGE_NAME:$IMAGE_VERSION ${server_exec}"
cid=$(docker run --rm -d -p 2222:22 "${IMAGE_NAME}:${IMAGE_VERSION}" ${server_exec})
retval=$?
if [[ ${retval} != 0 ]]; then
echo -e "${REDB}Failed to run docker image! (exit code: ${retval})${CLR}"
+1
View File
@@ -24,6 +24,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Topic :: Security
+1 -1
View File
@@ -22,7 +22,7 @@
THE SOFTWARE.
"""
# The version to display.
VERSION = 'v3.0.0'
VERSION = 'v3.1.0-dev'
# SSH software to impersonate
SSH_HEADER = 'SSH-{0}-OpenSSH_8.2'
+10 -10
View File
@@ -1,7 +1,7 @@
[tox]
envlist =
py{py3}-{test,pylint,flake8,vulture}
py{37,38,39,310,311}-{test,mypy,pylint,flake8,vulture}
py{37,38,39,310,311,312}-{test,mypy,pylint,flake8,vulture}
cov
skip_missing_interpreters = true
@@ -9,11 +9,11 @@ skip_missing_interpreters = true
deps =
test: pytest
test,cov: {[testenv:cov]deps}
test,py{37,38,39,310,311}-{type,mypy}: colorama
py{37,38,39,310,311}-{type,mypy}: {[testenv:mypy]deps}
py{py3,37,38,39,310,311}-{lint,pylint},lint: {[testenv:pylint]deps}
py{py3,37,38,39,310,311}-{lint,flake8},lint: {[testenv:flake8]deps}
py{py3,37,38,39,310,311}-{lint,vulture},lint: {[testenv:vulture]deps}
test,py{37,38,39,310,311,312}-{type,mypy}: colorama
py{37,38,39,310,311,312}-{type,mypy}: {[testenv:mypy]deps}
py{py3,37,38,39,310,311,312}-{lint,pylint},lint: {[testenv:pylint]deps}
py{py3,37,38,39,310,311,312}-{lint,flake8},lint: {[testenv:flake8]deps}
py{py3,37,38,39,310,311,312}-{lint,vulture},lint: {[testenv:vulture]deps}
setenv =
SSHAUDIT = {toxinidir}/src
test: COVERAGE_FILE = {toxinidir}/.coverage.{envname}
@@ -25,10 +25,10 @@ commands =
test: coverage combine
test: coverage report --show-missing
test: coverage html -d {toxinidir}/reports/html/coverage.{envname}
py{37,38,39,310,311}-{type,mypy}: {[testenv:mypy]commands}
py{py3,37,38,39,310,311}-{lint,pylint},lint: {[testenv:pylint]commands}
py{py3,37,38,39,310,311}-{lint,flake8},lint: {[testenv:flake8]commands}
py{py3,37,38,39,310,311}-{lint,vulture},lint: {[testenv:vulture]commands}
py{37,38,39,310,311,312}-{type,mypy}: {[testenv:mypy]commands}
py{py3,37,38,39,310,311,312}-{lint,pylint},lint: {[testenv:pylint]commands}
py{py3,37,38,39,310,311,312}-{lint,flake8},lint: {[testenv:flake8]commands}
py{py3,37,38,39,310,311,312}-{lint,vulture},lint: {[testenv:vulture]commands}
#ignore_outcome =
# type: true
# lint: true