diff --git a/Dockerfile b/Dockerfile index cc6357c..1b25a15 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,8 +27,8 @@ RUN apk --no-cache add \ py3-pip=22.3.1-r1 \ py3-setuptools=65.6.0-r0 \ py3-wheel=0.38.4-r0 \ - python3-dev=3.10.11-r0 \ - python3=3.10.11-r0 + python3-dev=3.10.12-r0 \ + python3=3.10.12-r0 # Install pipenv to manage installing the Python dependencies into a created # Python virtual environment. This is done separately from the virtual @@ -73,7 +73,7 @@ ENV VIRTUAL_ENV="${CISA_HOME}/.venv" RUN apk --no-cache add \ ca-certificates=20220614-r4 \ - chromium=112.0.5615.49-r0 \ + chromium=112.0.5615.165-r0 \ libxml2=2.10.4-r0 \ libxslt=1.1.37-r1 diff --git a/README.md b/README.md index 2449ef4..31de61d 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Python library. Then it will output CSVs with agency and domain level results. To run the `cisagov/vdp-scanner` image via Docker: ```console -docker run cisagov/vdp-scanner:0.2.0-dev.2 +docker run cisagov/vdp-scanner:0.2.1 ``` ### Running with Docker Compose ### @@ -36,7 +36,7 @@ docker run cisagov/vdp-scanner:0.2.0-dev.2 services: vdp-scanner: - image: 'cisagov/vdp-scanner:0.2.0-dev.2' + image: 'cisagov/vdp-scanner:0.2.1' volumes: - .:/task/host_mount ``` @@ -74,7 +74,7 @@ docker run cisagov/vdp-scanner:0.2.0-dev.2 1. Pull the new image: ```console - docker pull cisagov/vdp-scanner:0.2.0-dev.2 + docker pull cisagov/vdp-scanner:0.2.1 ``` 1. Recreate and run the container by following the [previous instructions](#running-with-docker). @@ -83,11 +83,11 @@ docker run cisagov/vdp-scanner:0.2.0-dev.2 The images of this container are tagged with [semantic versions](https://semver.org). It is recommended that most users use -a version tag (e.g. `:0.2.0-dev.2`). +a version tag (e.g. `:0.2.1`). | Image:tag | Description | |-----------|-------------| -|`cisagov/vdp-scanner:0.2.0-dev.2`| An exact release version. | +|`cisagov/vdp-scanner:0.2.1`| An exact release version. | |`cisagov/vdp-scanner:0.2`| The most recent release matching the major and minor version numbers. | |`cisagov/vdp-scanner:0`| The most recent release matching the major version number. | |`cisagov/vdp-scanner:edge` | The most recent image built from a merge into the `develop` branch of this repository. | @@ -153,7 +153,7 @@ Build the image locally using this git repository as the [build context](https:/ ```console docker build \ - --tag cisagov/vdp-scanner:0.2.0-dev.2 \ + --tag cisagov/vdp-scanner:0.2.1 \ https://github.com/cisagov/vdp-scanner-docker.git#develop ``` @@ -184,7 +184,7 @@ Docker: --file Dockerfile-x \ --platform linux/amd64 \ --output type=docker \ - --tag cisagov/vdp-scanner:0.2.0-dev.2 . + --tag cisagov/vdp-scanner:0.2.1 . ``` ## Contributing ## diff --git a/src/vdp_scanner.py b/src/vdp_scanner.py index 2c2cd8d..e8e37bd 100644 --- a/src/vdp_scanner.py +++ b/src/vdp_scanner.py @@ -42,6 +42,9 @@ GITHUB_CSV_URL = ( "https://raw.githubusercontent.com/cisagov/dotgov-data/main/current-federal.csv" ) +# The time in seconds to wait for a response from github.com before +# giving up. Thirty seconds seems like more than enough time. +GITHUB_CSV_URL_TIMEOUT = 30 class DomainResult(NamedTuple): @@ -252,7 +255,7 @@ def get_local_csv(file: str) -> List[Dict[str, str]]: def get_remote_csv() -> List[Dict[str, str]]: """Load domains from the CSV at the given URL.""" - resp = requests.get(GITHUB_CSV_URL) + resp = requests.get(GITHUB_CSV_URL, timeout=GITHUB_CSV_URL_TIMEOUT) # Default to utf-8 encoding if there is no encoding in the response encoding = resp.encoding if resp.encoding else "utf-8" if resp.status_code != 200: diff --git a/src/version.txt b/src/version.txt index d27e137..3ced358 100644 --- a/src/version.txt +++ b/src/version.txt @@ -1 +1 @@ -__version__ = "0.2.0-dev.2" +__version__ = "0.2.1"