Bump github.com/docker/distribution from 2.7.1+incompatible to 2.8.2+incompatible #1831
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
# schedule: | |
# - cron: '0 0 * * *' | |
jobs: | |
build: | |
name: Build Elementary CLI | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-latest, windows-latest, ubuntu-latest ] | |
steps: | |
- name: Setup go 1.18 | |
uses: actions/setup-go@v3 | |
with: { go-version: '1.18' } | |
- uses: actions/checkout@v3 | |
- run: cd cmd/elementary && go build . | |
- name: Go Build | |
run: | | |
mkdir bin | |
mv elementary* bin | |
shell: bash | |
working-directory: cmd/elementary | |
- name: Upload | |
uses: actions/upload-artifact@master | |
with: | |
name: elementary ${{ matrix.os }} | |
path: cmd/elementary/bin | |
lint: | |
name: Lint Elementary | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup go 1.18 | |
uses: actions/setup-go@v3 | |
with: { go-version: '1.18' } | |
- uses: actions/checkout@v3 | |
- name: Lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.45.2 | |
args: --verbose --config .github/.golangci.yml --enable gofmt --enable goimports --enable gofumpt | |
if: matrix.os != 'windows-latest' | |
- name: Lint Windows | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.45.2 | |
args: --verbose --config .github/.golangci.yml | |
if: matrix.os == 'windows-latest' | |
test: | |
name: Unittest Elementary | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-latest, windows-latest, ubuntu-latest ] | |
steps: | |
- name: Setup go 1.18 | |
uses: actions/setup-go@v3 | |
with: { go-version: '1.18' } | |
- uses: actions/checkout@v3 | |
- run: go install github.com/ory/go-acc@latest | |
- run: bash test/download_testdata.sh | |
- run: go list ./... | |
- run: go-acc ./... | |
- name: Upload coverage | |
env: | |
CI: "true" | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
run: bash <(curl -s https://codecov.io/bash) -f coverage.txt | |
shell: bash | |
cli-integrationtests: | |
name: Integration Test CLI | |
needs: build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-latest, windows-latest, ubuntu-latest ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: { python-version: '3.8' } | |
- run: doskey python3=python | |
if: matrix.os == 'windows-latest' | |
- name: download elementary | |
uses: actions/download-artifact@v3 | |
with: | |
name: elementary ${{ matrix.os }} | |
- run: curl --fail --output ${{ matrix.os }}.zip --location https://github.com/forensicanalysis/forensicstore/releases/download/v0.17.1/${{ matrix.os }}.zip | |
- run: unzip ${{ matrix.os }}.zip | |
- run: chmod +x elementary | |
- name: Set system path | |
run: echo $PWD >> $GITHUB_PATH | |
shell: bash | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: { node-version: '12' } | |
- name: Install bats | |
run: npm install -g bats@1.1.0 | |
- name: Download testdata | |
run: bash test/download_testdata.sh | |
shell: bash | |
- name: Bats test Unix | |
run: bats test/bats/elementary.bats test/bats/elementary_unix.bats | |
shell: bash | |
if: matrix.os != 'windows-latest' | |
- name: Bats test Windows | |
run: bats test/bats/elementary.bats | |
shell: bash | |
if: matrix.os == 'windows-latest' | |
collect: | |
name: Test Collect | |
runs-on: windows-latest | |
steps: | |
- name: Collect artifacts | |
run: | | |
curl --fail --output windows.zip --location https://github.com/forensicanalysis/artifactcollector/releases/download/v0.15.0/windows.zip | |
unzip windows.zip | |
./artifactcollector.exe | |
mv *.forensicstore test.forensicstore | |
- name: upload test.forensicstore | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test.forensicstore | |
path: test.forensicstore | |
case0: | |
name: Test Case 0 | |
needs: [ collect, build ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v3 | |
with: { python-version: '3.8' } | |
- name: download test.forensicstore | |
uses: actions/download-artifact@v3 | |
with: | |
name: test.forensicstore | |
- name: download elementary | |
uses: actions/download-artifact@v3 | |
with: | |
name: elementary ubuntu-latest | |
- run: chmod +x elementary | |
- run: ./elementary install -f | |
# - name: run import-json | |
# run: elementary run --debug import-json --format csv test.forensicstore | |
# shell: bash | |
- name: run networking | |
run: ./elementary run --debug networking --format csv test.forensicstore | |
- name: run prefetch | |
run: ./elementary run --debug prefetch --format csv test.forensicstore | |
- name: run run-keys | |
run: ./elementary run --debug run-keys --format csv test.forensicstore | |
- name: run services | |
run: ./elementary run --debug services --format csv test.forensicstore | |
- name: run shimcache | |
run: ./elementary run --debug shimcache --format csv test.forensicstore | |
- name: run yara | |
run: ./elementary run --debug yara --format csv test.forensicstore | |
case1: | |
name: Test Case 1 (import-file, eventlogs, sigma) | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: download elementary | |
uses: actions/download-artifact@v3 | |
with: | |
name: elementary ubuntu-latest | |
- run: chmod +x elementary | |
- run: ./elementary install -f | |
- run: curl --fail --output ubuntu-latest.zip --location https://github.com/forensicanalysis/forensicstore/releases/download/v0.17.1/ubuntu-latest.zip | |
- run: unzip ubuntu-latest.zip | |
- run: curl --fail --output master.zip --location https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/archive/master.zip | |
- run: unzip master.zip | |
- run: ./forensicstore create case1.forensicstore | |
- run: ./elementary run --debug import-file --file EVTX-ATTACK-SAMPLES-master case1.forensicstore | |
- run: ./elementary run --debug eventlogs --format none --add-to-store case1.forensicstore | |
- run: ./elementary run --debug sigma case1.forensicstore | |
case2: | |
name: Test Case 2 (hotfixes) # import-image | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v3 | |
with: { python-version: '3.8' } | |
- name: download elementary | |
uses: actions/download-artifact@v3 | |
with: | |
name: elementary ubuntu-latest | |
- run: chmod +x elementary | |
- run: ./elementary install -f | |
- run: curl --fail --output ubuntu-latest.zip --location https://github.com/forensicanalysis/forensicstore/releases/download/v0.17.1/ubuntu-latest.zip | |
- run: unzip ubuntu-latest.zip | |
- run: ./forensicstore create case2.forensicstore | |
- run: curl --fail --output win10_mock.zip --location https://download.artifacthub.org/windows/win10_mock.zip | |
- run: unzip win10_mock.zip | |
# - run: ./elementary run --debug import-image --input-dir . --input-file win10_mock.vhd case2.forensicstore | |
- run: ./elementary run --debug hotfixes --format csv case2.forensicstore | |
case3: | |
name: Test Case 3 (import-forensicstore, plaso) | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: download elementary | |
uses: actions/download-artifact@v3 | |
with: | |
name: elementary ubuntu-latest | |
- run: chmod +x elementary | |
- run: ./elementary install -f | |
- run: curl --fail --output ubuntu-latest.zip --location https://github.com/forensicanalysis/forensicstore/releases/download/v0.17.1/ubuntu-latest.zip | |
- run: unzip ubuntu-latest.zip | |
- run: curl --fail --output example2.forensicstore --location https://download.artifacthub.org/forensics/example2.forensicstore | |
- run: ./forensicstore create case3.forensicstore | |
- run: ./elementary run --debug import-forensicstore --file example2.forensicstore case3.forensicstore | |
- run: ./elementary run --debug plaso case3.forensicstore | |
case4: | |
name: Test Case 4 (usb, export) | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v3 | |
with: { python-version: '3.8' } | |
- name: download elementary | |
uses: actions/download-artifact@v3 | |
with: | |
name: elementary ubuntu-latest | |
- run: chmod +x elementary | |
- run: ./elementary install -f | |
- run: curl --fail --output usb.forensicstore --location https://download.artifacthub.org/forensics/usb.forensicstore | |
- run: ./elementary run --debug usb --format csv usb.forensicstore | |
- run: ./elementary run --debug export --format json usb.forensicstore | |
case5: | |
name: Test Case 5 (software, export-timesketch) | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v3 | |
with: { python-version: '3.8' } | |
- name: download elementary | |
uses: actions/download-artifact@v3 | |
with: | |
name: elementary ubuntu-latest | |
- run: chmod +x elementary | |
- run: ./elementary install -f | |
- run: curl --fail --output example2.forensicstore --location https://download.artifacthub.org/forensics/example2.forensicstore | |
- run: ./elementary run --debug software --add-to-store --format csv example2.forensicstore | |
- run: ./elementary run --debug export-timesketch --timesketch export.jsonl --filter type=uninstall_entry --format jsonl example2.forensicstore | |
scripts: | |
name: Test Scripts | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
steps: | |
- uses: actions/setup-python@v3 | |
with: { python-version: '3.8' } | |
- run: pip install pylint==2.8.3 pytest pytest-cov | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- run: pip install -r plugin/scripts/requirements.txt | |
- name: Python Lint | |
run: pylint *.py --rcfile ../../../test/.pylintrc | |
shell: bash | |
working-directory: plugin/scripts/scripts | |
- name: Download testdata | |
run: bash test/download_testdata.sh | |
shell: bash | |
- name: Python Test | |
run: pytest -v --cov-config .coveragerc --cov-report=xml --cov=plugin/scripts/scripts test/python | |
shell: bash | |
- name: Upload coverage | |
env: | |
CI: "true" | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
run: bash <(curl -s https://codecov.io/bash) -f coverage.xml | |
shell: bash |