Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚠️ CONFLICT! Lineage pull request for: skeleton #89

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ###
Expand All @@ -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
```
Expand Down Expand Up @@ -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).
Expand All @@ -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. |
Expand Down Expand Up @@ -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
```

Expand Down Expand Up @@ -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 ##
Expand Down
5 changes: 4 additions & 1 deletion src/vdp_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.0-dev.2"
__version__ = "0.2.1"
Loading