Skip to content

Commit ce100dc

Browse files
authored
Merge pull request #21 from cisagov/bug/small_fixes
Fix `mypy` Error and Correct Platforms in README
2 parents 1158454 + 844c6d1 commit ce100dc

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
[![Docker Pulls](https://img.shields.io/docker/pulls/cisagov/vdp-scanner)](https://hub.docker.com/r/cisagov/vdp-scanner)
1212
[![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/cisagov/vdp-scanner)](https://hub.docker.com/r/cisagov/vdp-scanner)
13-
[![Platforms](https://img.shields.io/badge/platforms-amd64%20%7C%20arm%2Fv6%20%7C%20arm%2Fv7%20%7C%20arm64%20%7C%20ppc64le%20%7C%20s390x-blue)](https://hub.docker.com/r/cisagov/vdp-scanner/tags)
13+
[![Platforms](https://img.shields.io/badge/platforms-amd64%20%7C%20arm%2Fv7%20%7C%20arm64-blue)](https://hub.docker.com/r/cisagov/vdp-scanner/tags)
1414

1515
This is a Docker project to scan either the
1616
[GSA current Federal .gov domain list](https://github.com/GSA/data/blob/master/dotgov-domains/current-federal.csv)
@@ -25,7 +25,7 @@ Python library. Then it will output CSVs with agency and domain level results.
2525
To run the `cisagov/vdp-scanner` image via Docker:
2626

2727
```console
28-
docker run cisagov/vdp-scanner:0.0.4
28+
docker run cisagov/vdp-scanner:0.0.5-rc.1
2929
```
3030

3131
### Running with Docker Compose ###
@@ -38,7 +38,7 @@ docker run cisagov/vdp-scanner:0.0.4
3838

3939
services:
4040
vdp-scanner:
41-
image: 'cisagov/vdp-scanner:0.0.4'
41+
image: 'cisagov/vdp-scanner:0.0.5-rc.1'
4242
volumes:
4343
- .:/task/host_mount
4444
```
@@ -76,7 +76,7 @@ docker run cisagov/vdp-scanner:0.0.4
7676
1. Pull the new image:
7777

7878
```console
79-
docker pull cisagov/vdp-scanner:0.0.4
79+
docker pull cisagov/vdp-scanner:0.0.5-rc.1
8080
```
8181

8282
1. Recreate and run the container by following the [previous instructions](#running-with-docker).
@@ -85,11 +85,11 @@ docker run cisagov/vdp-scanner:0.0.4
8585

8686
The images of this container are tagged with
8787
[semantic versions](https://semver.org). It is recommended that most users use
88-
a version tag (e.g. `:0.0.4`).
88+
a version tag (e.g. `:0.0.5-rc.1`).
8989

9090
| Image:tag | Description |
9191
|-----------|-------------|
92-
|`cisagov/vdp-scanner:0.0.4`| An exact release version. |
92+
|`cisagov/vdp-scanner:0.0.5-rc.1`| An exact release version. |
9393
|`cisagov/vdp-scanner:0.0`| The most recent release matching the major and minor version numbers. |
9494
|`cisagov/vdp-scanner:0`| The most recent release matching the major version number. |
9595
|`cisagov/vdp-scanner:edge` | The most recent image built from a merge into the `develop` branch of this repository. |
@@ -155,7 +155,7 @@ Build the image locally using this git repository as the [build context](https:/
155155

156156
```console
157157
docker build \
158-
--tag cisagov/vdp-scanner:0.0.4 \
158+
--tag cisagov/vdp-scanner:0.0.5-rc.1 \
159159
https://github.com/cisagov/vdp-scanner-docker.git#develop
160160
```
161161

@@ -186,7 +186,7 @@ Docker:
186186
--file Dockerfile-x \
187187
--platform linux/amd64 \
188188
--output type=docker \
189-
--tag cisagov/vdp-scanner:0.0.4 .
189+
--tag cisagov/vdp-scanner:0.0.5-rc.1 .
190190
```
191191

192192
## Contributing ##

src/vdp_scanner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,11 @@ def get_local_csv(file: str) -> List[Dict[str, str]]:
253253
def get_remote_csv() -> List[Dict[str, str]]:
254254
"""Load domains from the CSV at the given URL."""
255255
resp = requests.get(GITHUB_CSV_URL)
256+
# Default to utf-8 encoding if there is no encoding in the response
257+
encoding = resp.encoding if resp.encoding else "utf-8"
256258
if resp.status_code != 200:
257259
return []
258-
csv_lines = [str(line, resp.encoding) for line in resp.iter_lines()]
260+
csv_lines = [str(line, encoding) for line in resp.iter_lines()]
259261

260262
return list(csv.DictReader(csv_lines))
261263

src/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.0.4"
1+
__version__ = "0.0.5-rc.1"

0 commit comments

Comments
 (0)