mirror of
https://github.com/jtesta/ssh-audit.git
synced 2026-05-25 23:41:22 +02:00
Compare commits
6 Commits
v3.0.0
...
cf05bf2003
| Author | SHA1 | Date | |
|---|---|---|---|
| cf05bf2003 | |||
| e1b29f94e4 | |||
| d62e4cd80c | |||
| 2809ff464a | |||
| 02ab487232 | |||
| d62acd688e |
@@ -7,7 +7,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
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:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ FROM python:3-slim
|
|||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
# Update the image to remediate any vulnerabilities.
|
# 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.
|
# Remove suid & sgid bits from all files.
|
||||||
RUN find / -xdev -perm /6000 -exec chmod ug-s {} \; 2> /dev/null || true
|
RUN find / -xdev -perm /6000 -exec chmod ug-s {} \; 2> /dev/null || true
|
||||||
|
|||||||
@@ -4,13 +4,6 @@ ifeq ($(VERSION),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
all:
|
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} .
|
docker build -t positronsecurity/ssh-audit:${VERSION} .
|
||||||
|
|
||||||
upload:
|
upload:
|
||||||
|
|||||||
+3
-3
@@ -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:
|
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
|
||||||
$ make -f Makefile.pypi uploadtest
|
$ make -f Makefile.pypi uploadtest
|
||||||
```
|
```
|
||||||
@@ -67,13 +67,13 @@ Upload the snap with:
|
|||||||
|
|
||||||
# Docker
|
# Docker
|
||||||
|
|
||||||
Build image with:
|
Build a local image with:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ make -f Makefile.docker
|
$ 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
|
$ make -f Makefile.docker upload
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
- historical information from OpenSSH, Dropbear SSH and libssh;
|
- historical information from OpenSSH, Dropbear SSH and libssh;
|
||||||
- policy scans to ensure adherence to a hardened/standard configuration;
|
- policy scans to ensure adherence to a hardened/standard configuration;
|
||||||
- runs on Linux and Windows;
|
- runs on Linux and Windows;
|
||||||
- supports Python 3.7 - 3.11;
|
- supports Python 3.7 - 3.12;
|
||||||
- no dependencies
|
- no dependencies
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -178,6 +178,9 @@ For convenience, a web front-end on top of the command-line tool is available at
|
|||||||
|
|
||||||
## ChangeLog
|
## ChangeLog
|
||||||
|
|
||||||
|
### v3.1.0-dev (???)
|
||||||
|
- Added Python 3.12 to Tox tests.
|
||||||
|
|
||||||
### v3.0.0 (2023-09-07)
|
### 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).
|
- 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).
|
- Hostname resolution failure no longer causes scans against multiple hosts to terminate unexpectedly; credit [Dani Cuesta](https://github.com/daniel-cues).
|
||||||
|
|||||||
+4
-4
@@ -456,9 +456,9 @@ run_test() {
|
|||||||
test_name="TinySSH ${version} ${test_number}"
|
test_name="TinySSH ${version} ${test_number}"
|
||||||
fi
|
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=$?
|
retval=$?
|
||||||
#echo "Running: docker run -d -p 2222:22 $IMAGE_NAME:$IMAGE_VERSION ${server_exec}"
|
|
||||||
if [[ ${retval} != 0 ]]; then
|
if [[ ${retval} != 0 ]]; then
|
||||||
echo -e "${REDB}Failed to run docker image! (exit code: ${retval})${CLR}"
|
echo -e "${REDB}Failed to run docker image! (exit code: ${retval})${CLR}"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -603,8 +603,8 @@ run_policy_test() {
|
|||||||
expected_exit_code=$6
|
expected_exit_code=$6
|
||||||
|
|
||||||
|
|
||||||
#echo "Running: 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 -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=$?
|
retval=$?
|
||||||
if [[ ${retval} != 0 ]]; then
|
if [[ ${retval} != 0 ]]; then
|
||||||
echo -e "${REDB}Failed to run docker image! (exit code: ${retval})${CLR}"
|
echo -e "${REDB}Failed to run docker image! (exit code: ${retval})${CLR}"
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ classifiers =
|
|||||||
Programming Language :: Python :: 3.9
|
Programming Language :: Python :: 3.9
|
||||||
Programming Language :: Python :: 3.10
|
Programming Language :: Python :: 3.10
|
||||||
Programming Language :: Python :: 3.11
|
Programming Language :: Python :: 3.11
|
||||||
|
Programming Language :: Python :: 3.12
|
||||||
Programming Language :: Python :: Implementation :: CPython
|
Programming Language :: Python :: Implementation :: CPython
|
||||||
Programming Language :: Python :: Implementation :: PyPy
|
Programming Language :: Python :: Implementation :: PyPy
|
||||||
Topic :: Security
|
Topic :: Security
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
"""
|
"""
|
||||||
# The version to display.
|
# The version to display.
|
||||||
VERSION = 'v3.0.0'
|
VERSION = 'v3.1.0-dev'
|
||||||
|
|
||||||
# SSH software to impersonate
|
# SSH software to impersonate
|
||||||
SSH_HEADER = 'SSH-{0}-OpenSSH_8.2'
|
SSH_HEADER = 'SSH-{0}-OpenSSH_8.2'
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
py{py3}-{test,pylint,flake8,vulture}
|
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
|
cov
|
||||||
skip_missing_interpreters = true
|
skip_missing_interpreters = true
|
||||||
|
|
||||||
@@ -9,11 +9,11 @@ skip_missing_interpreters = true
|
|||||||
deps =
|
deps =
|
||||||
test: pytest
|
test: pytest
|
||||||
test,cov: {[testenv:cov]deps}
|
test,cov: {[testenv:cov]deps}
|
||||||
test,py{37,38,39,310,311}-{type,mypy}: colorama
|
test,py{37,38,39,310,311,312}-{type,mypy}: colorama
|
||||||
py{37,38,39,310,311}-{type,mypy}: {[testenv:mypy]deps}
|
py{37,38,39,310,311,312}-{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,312}-{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,312}-{lint,flake8},lint: {[testenv:flake8]deps}
|
||||||
py{py3,37,38,39,310,311}-{lint,vulture},lint: {[testenv:vulture]deps}
|
py{py3,37,38,39,310,311,312}-{lint,vulture},lint: {[testenv:vulture]deps}
|
||||||
setenv =
|
setenv =
|
||||||
SSHAUDIT = {toxinidir}/src
|
SSHAUDIT = {toxinidir}/src
|
||||||
test: COVERAGE_FILE = {toxinidir}/.coverage.{envname}
|
test: COVERAGE_FILE = {toxinidir}/.coverage.{envname}
|
||||||
@@ -25,10 +25,10 @@ commands =
|
|||||||
test: coverage combine
|
test: coverage combine
|
||||||
test: coverage report --show-missing
|
test: coverage report --show-missing
|
||||||
test: coverage html -d {toxinidir}/reports/html/coverage.{envname}
|
test: coverage html -d {toxinidir}/reports/html/coverage.{envname}
|
||||||
py{37,38,39,310,311}-{type,mypy}: {[testenv:mypy]commands}
|
py{37,38,39,310,311,312}-{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,312}-{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,312}-{lint,flake8},lint: {[testenv:flake8]commands}
|
||||||
py{py3,37,38,39,310,311}-{lint,vulture},lint: {[testenv:vulture]commands}
|
py{py3,37,38,39,310,311,312}-{lint,vulture},lint: {[testenv:vulture]commands}
|
||||||
#ignore_outcome =
|
#ignore_outcome =
|
||||||
# type: true
|
# type: true
|
||||||
# lint: true
|
# lint: true
|
||||||
|
|||||||
Reference in New Issue
Block a user