Skip to content
Merged
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
42 changes: 42 additions & 0 deletions Dockerfile-scraper
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM ubuntu:jammy

RUN apt-get update \
&& apt-get upgrade -y --no-install-recommends \
&& apt-get install -y \
curl \
default-jdk \
jq \
libdigest-sha-perl \
openssl \
python3-pip \
&& apt-get autoremove \
&& apt-get autoclean \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN python3 -m pip install yq

RUN curl -fsSOL https://github.com/CycloneDX/cyclonedx-cli/releases/download/v0.24.2/cyclonedx-linux-x64 \
&& mv cyclonedx-linux-x64 /usr/local/bin/cdx \
&& chmod +x /usr/local/bin/cdx \
&& curl -fsSOL https://github.com/anchore/syft/releases/download/v0.60.3/syft_0.60.3_linux_amd64.tar.gz \
&& tar xvzf syft_0.60.3_linux_amd64.tar.gz syft \
&& mv syft /usr/local/bin \
&& chmod +x /usr/local/bin/syft \
&& rm syft_0.60.3_linux_amd64.tar.gz

RUN which cdx \
&& which curl \
&& which jar \
&& which jdeps \
&& which jq \
&& which openssl \
&& which python3 \
&& which shasum \
&& which syft \
&& which xq

COPY scripts/sbom_scraper.sh /usr/local/bin/sbom_scraper.sh
RUN chmod +x /usr/local/bin/sbom_scraper.sh

ENTRYPOINT ["/usr/local/bin/sbom_scraper.sh"]
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ Make a change to the code and validate the changes:
task check
```

And then test changes with a working set of options:

```bash
task build-scraper
task scrape -- -h
task scrape -- -a "RKVST, Inc" \
-e support@rkvst.com \
-A Docker \
-c credentials/client_secret \
-u https://app.rkvst.io \
8f8f2467-01fe-48fb-891a-5c0be643cec1 \
aerospike:ce-6.0.0.5
```

### Seeking a review

#### Synchronizing the upstream
Expand Down
19 changes: 19 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ version: '3'

tasks:

build-scraper:
desc: Build scraper image
cmds:
- docker build --no-cache -f Dockerfile-scraper -t archivist-shell-scraper .

check:
desc: Standard linting of shell scripts
cmds:
Expand All @@ -11,3 +16,17 @@ tasks:
desc: Clean git repo
cmds:
- git clean -fdX

scrape:
desc: Execute scraper command in dockerfile
cmds:
- |
docker run \
--rm -it \
-v $(pwd):$(pwd) \
-w $(pwd) \
-u $(id -u):$(id -g) \
-e USER \
archivist-shell-scraper \
{{.CLI_ARGS}}

5 changes: 0 additions & 5 deletions scripts/cyclonedx-wrapper.xsd

This file was deleted.

Loading