Showing preview only (3,078K chars total). Download the full file or copy to clipboard to get everything.
Repository: future-architect/vuls
Branch: master
Commit: d2acdcdbf07b
Files: 208
Total size: 2.9 MB
Directory structure:
gitextract_uolk7xgb/
├── .dockerignore
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── BUG_REPORT.md
│ │ ├── FEATURE_REQUEST.md
│ │ ├── SUPPORT_QUESTION.md
│ │ └── VULSREPO.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── build.yml
│ ├── codeql-analysis.yml
│ ├── diet-check.yml
│ ├── docker-publish.yml
│ ├── golangci.yml
│ ├── goreleaser.yml
│ ├── scorecard.yml
│ └── test.yml
├── .gitignore
├── .golangci.yml
├── .goreleaser.yml
├── CHANGELOG.md
├── Dockerfile
├── GNUmakefile
├── LICENSE
├── README.md
├── SECURITY.md
├── cache/
│ ├── bolt.go
│ ├── bolt_test.go
│ └── db.go
├── cmd/
│ ├── scanner/
│ │ └── main.go
│ └── vuls/
│ └── main.go
├── config/
│ ├── awsconf.go
│ ├── azureconf.go
│ ├── chatworkconf.go
│ ├── color.go
│ ├── config.go
│ ├── config_test.go
│ ├── config_v1.go
│ ├── googlechatconf.go
│ ├── httpconf.go
│ ├── jsonloader.go
│ ├── loader.go
│ ├── os.go
│ ├── os_test.go
│ ├── portscan.go
│ ├── portscan_test.go
│ ├── saasconf.go
│ ├── scanmode.go
│ ├── scanmodule.go
│ ├── scanmodule_test.go
│ ├── slackconf.go
│ ├── smtpconf.go
│ ├── syslog/
│ │ ├── syslogconf.go
│ │ ├── syslogconf_test.go
│ │ ├── syslogconf_windows.go
│ │ └── types.go
│ ├── telegramconf.go
│ ├── tomlloader.go
│ ├── tomlloader_test.go
│ ├── vulnDictConf.go
│ └── windows.go
├── constant/
│ └── constant.go
├── contrib/
│ ├── Dockerfile
│ ├── future-vuls/
│ │ ├── README.md
│ │ ├── cmd/
│ │ │ └── main.go
│ │ └── pkg/
│ │ ├── config/
│ │ │ └── config.go
│ │ ├── cpe/
│ │ │ └── cpe.go
│ │ ├── discover/
│ │ │ └── discover.go
│ │ └── fvuls/
│ │ ├── fvuls.go
│ │ └── model.go
│ ├── owasp-dependency-check/
│ │ └── parser/
│ │ └── parser.go
│ └── trivy/
│ ├── README.md
│ ├── cmd/
│ │ └── main.go
│ ├── parser/
│ │ ├── parser.go
│ │ └── v2/
│ │ ├── parser.go
│ │ └── parser_test.go
│ └── pkg/
│ ├── converter.go
│ ├── converter_test.go
│ └── export_test.go
├── cti/
│ └── cti.go
├── cwe/
│ ├── cwe.go
│ ├── en.go
│ ├── ja.go
│ ├── owasp.go
│ └── sans.go
├── detector/
│ ├── cti.go
│ ├── cve_client.go
│ ├── detector.go
│ ├── detector_test.go
│ ├── exploitdb.go
│ ├── exploitdb_test.go
│ ├── github.go
│ ├── javadb/
│ │ └── javadb.go
│ ├── kevuln.go
│ ├── library.go
│ ├── msf.go
│ ├── util.go
│ ├── vuls2/
│ │ ├── db.go
│ │ ├── db_test.go
│ │ ├── export_test.go
│ │ ├── vendor.go
│ │ ├── vuls2.go
│ │ └── vuls2_test.go
│ ├── wordpress.go
│ └── wordpress_test.go
├── errof/
│ └── errof.go
├── go.mod
├── go.sum
├── gost/
│ ├── gost.go
│ ├── microsoft.go
│ ├── microsoft_test.go
│ ├── pseudo.go
│ ├── redhat.go
│ ├── redhat_test.go
│ └── util.go
├── logging/
│ └── logutil.go
├── models/
│ ├── cvecontents.go
│ ├── cvecontents_test.go
│ ├── github.go
│ ├── library.go
│ ├── library_test.go
│ ├── models.go
│ ├── packages.go
│ ├── packages_test.go
│ ├── scanresults.go
│ ├── scanresults_test.go
│ ├── utils.go
│ ├── utils_test.go
│ ├── vulninfos.go
│ ├── vulninfos_test.go
│ └── wordpress.go
├── reporter/
│ ├── azureblob.go
│ ├── chatwork.go
│ ├── email.go
│ ├── googlechat.go
│ ├── http.go
│ ├── localfile.go
│ ├── s3.go
│ ├── sbom/
│ │ ├── cyclonedx.go
│ │ ├── cyclonedx_test.go
│ │ ├── purl.go
│ │ ├── purl_test.go
│ │ ├── spdx.go
│ │ └── spdx_test.go
│ ├── slack.go
│ ├── slack_test.go
│ ├── stdout.go
│ ├── syslog.go
│ ├── syslog_test.go
│ ├── telegram.go
│ ├── util.go
│ ├── util_test.go
│ └── writer.go
├── saas/
│ ├── saas.go
│ ├── uuid.go
│ └── uuid_test.go
├── scanner/
│ ├── alma.go
│ ├── alpine.go
│ ├── alpine_test.go
│ ├── amazon.go
│ ├── base.go
│ ├── base_test.go
│ ├── centos.go
│ ├── debian.go
│ ├── debian_test.go
│ ├── executil.go
│ ├── executil_test.go
│ ├── fedora.go
│ ├── freebsd.go
│ ├── freebsd_test.go
│ ├── library.go
│ ├── library_test.go
│ ├── macos.go
│ ├── macos_test.go
│ ├── oracle.go
│ ├── pseudo.go
│ ├── redhatbase.go
│ ├── redhatbase_test.go
│ ├── rhel.go
│ ├── rocky.go
│ ├── scanner.go
│ ├── scanner_test.go
│ ├── suse.go
│ ├── suse_test.go
│ ├── trivy/
│ │ └── jar/
│ │ ├── jar.go
│ │ └── parse.go
│ ├── unknownDistro.go
│ ├── utils/
│ │ └── filepath/
│ │ ├── unix/
│ │ │ └── unix.go
│ │ └── windows/
│ │ └── windows.go
│ ├── utils.go
│ ├── utils_test.go
│ ├── windows.go
│ └── windows_test.go
├── server/
│ └── server.go
├── setup/
│ └── docker/
│ └── README.md
├── subcmds/
│ ├── configtest.go
│ ├── discover.go
│ ├── history.go
│ ├── report.go
│ ├── report_windows.go
│ ├── saas.go
│ ├── scan.go
│ ├── server.go
│ ├── string_array_flag.go
│ ├── tui.go
│ └── util.go
├── tui/
│ └── tui.go
└── util/
├── util.go
└── util_test.go
================================================
FILE CONTENTS
================================================
================================================
FILE: .dockerignore
================================================
.dockerignore
Dockerfile
vendor/
*.sqlite3*
setup/
img/
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: kotakanbe
================================================
FILE: .github/ISSUE_TEMPLATE/BUG_REPORT.md
================================================
---
name: Bug Report
labels: bug
about: If something isn't working as expected.
---
# What did you do? (required. The issue will be **closed** when not provided.)
# What did you expect to happen?
# What happened instead?
* Current Output
Please re-run the command using ```-debug``` and provide the output below.
# Steps to reproduce the behaviour
# Configuration (**MUST** fill this out):
* Go version (`go version`):
* Go environment (`go env`):
* Vuls environment:
Hash : ____
To check the commit hash of HEAD
$ vuls -v
or
$ cd $GOPATH/src/github.com/future-architect/vuls
$ git rev-parse --short HEAD
* config.toml:
* command:
================================================
FILE: .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
================================================
---
name: Feature Request
labels: enhancement
about: I have a suggestion (and might want to implement myself)!
---
<!--
If this is a FEATURE REQUEST, request format does not matter!
-->
================================================
FILE: .github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md
================================================
---
name: Support Question
labels: question
about: If you have a question about Vuls.
---
<!--
If you have a trouble, feel free to ask.
Make sure you're not asking duplicate question by searching on the issues lists.
-->
================================================
FILE: .github/ISSUE_TEMPLATE/VULSREPO.md
================================================
---
name: Vuls Repo
labels: vulsrepo
about: If something isn't working as expected.
---
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
If this Pull Request is work in progress, Add a prefix of “[WIP]” in the title.
# What did you implement:
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
Fixes # (issue)
## Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
# How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
# Checklist:
You don't have to satisfy all of the following.
- [ ] Write tests
- [ ] Write documentation
- [ ] Check that there aren't other open pull requests for the same issue/feature
- [ ] Format your source code by `make fmt`
- [ ] Pass the test by `make test`
- [ ] Provide verification config / commands
- [ ] Enable "Allow edits from maintainers" for this PR
- [ ] Update the messages below
***Is this ready for review?:*** NO
# Reference
* https://blog.github.com/2015-01-21-how-to-write-the-perfect-pull-request/
================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: "monthly"
cooldown:
default-days: 14
groups:
all:
patterns:
- "*"
target-branch: master
- package-ecosystem: docker
directories:
- /
- /contrib
schedule:
interval: "monthly"
cooldown:
default-days: 14
groups:
all:
patterns:
- "*"
target-branch: master
- package-ecosystem: gomod
directory: / # Location of package manifests
schedule:
interval: "cron"
cronjob: "0 0 1-7,15-21 * 1" # at 00:00 on the 1st and 3rd Monday of each month
cooldown:
default-days: 3
groups:
vuls:
patterns:
- "github.com/MaineK00n/vuls-data-update"
- "github.com/MaineK00n/vuls2"
- "github.com/vulsio/go-cti"
- "github.com/vulsio/go-cve-dictionary"
- "github.com/vulsio/go-exploitdb"
- "github.com/vulsio/go-kev"
- "github.com/vulsio/go-msfdb"
- "github.com/vulsio/gost"
trivy:
patterns:
- "github.com/aquasecurity/trivy"
- "github.com/aquasecurity/trivy-db"
- "github.com/aquasecurity/trivy-java-db"
others:
patterns:
- "*"
exclude-patterns:
- "github.com/MaineK00n/vuls-data-update"
- "github.com/MaineK00n/vuls2"
- "github.com/vulsio/go-cti"
- "github.com/vulsio/go-cve-dictionary"
- "github.com/vulsio/go-exploitdb"
- "github.com/vulsio/go-kev"
- "github.com/vulsio/go-msfdb"
- "github.com/vulsio/gost"
- "github.com/aquasecurity/trivy"
- "github.com/aquasecurity/trivy-db"
- "github.com/aquasecurity/trivy-java-db"
target-branch: master
================================================
FILE: .github/workflows/build.yml
================================================
name: Build
on:
pull_request:
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Go 1.x
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
- name: build
run: make build
- name: build-scanner
run: make build-scanner
- name: build-trivy-to-vuls
run: make build-trivy-to-vuls
- name: build-future-vuls
run: make build-future-vuls
- name: build-snmp2cpe
run: make build-snmp2cpe
================================================
FILE: .github/workflows/codeql-analysis.yml
================================================
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '32 20 * * 0'
env:
GOEXPERIMENT: jsonv2
permissions:
contents: read
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Go 1.x
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
================================================
FILE: .github/workflows/diet-check.yml
================================================
name: Diet PR Check
on:
pull_request:
paths: ['go.mod', 'go.sum']
permissions:
contents: read
jobs:
diet-metrics:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
- name: Metrics (PR branch)
run: |
echo "AFTER_GOSUM=$(wc -l < go.sum)" >> "$GITHUB_ENV"
echo "AFTER_DEPS=$(grep -c '// indirect' go.mod | tr -d ' ' || echo 0)" >> "$GITHUB_ENV"
echo "AFTER_TOTAL=$(grep -cP $'^\t' go.mod || echo 0)" >> "$GITHUB_ENV"
CGO_ENABLED=0 GOEXPERIMENT=jsonv2 go build -trimpath -o /tmp/vuls-after ./cmd/vuls
echo "AFTER_SIZE=$(stat -c%s /tmp/vuls-after)" >> "$GITHUB_ENV"
CGO_ENABLED=0 GOEXPERIMENT=jsonv2 go build -tags=scanner -trimpath -o /tmp/scanner-after ./cmd/scanner
echo "AFTER_SCANNER_SIZE=$(stat -c%s /tmp/scanner-after)" >> "$GITHUB_ENV"
- name: Metrics (base branch)
run: |
git checkout "${{ github.event.pull_request.base.sha }}"
echo "BEFORE_GOSUM=$(wc -l < go.sum)" >> "$GITHUB_ENV"
echo "BEFORE_DEPS=$(grep -c '// indirect' go.mod | tr -d ' ' || echo 0)" >> "$GITHUB_ENV"
echo "BEFORE_TOTAL=$(grep -cP $'^\t' go.mod || echo 0)" >> "$GITHUB_ENV"
CGO_ENABLED=0 GOEXPERIMENT=jsonv2 go build -trimpath -o /tmp/vuls-before ./cmd/vuls
echo "BEFORE_SIZE=$(stat -c%s /tmp/vuls-before)" >> "$GITHUB_ENV"
CGO_ENABLED=0 GOEXPERIMENT=jsonv2 go build -tags=scanner -trimpath -o /tmp/scanner-before ./cmd/scanner
echo "BEFORE_SCANNER_SIZE=$(stat -c%s /tmp/scanner-before)" >> "$GITHUB_ENV"
- name: Report
run: |
before_direct=$((BEFORE_TOTAL - BEFORE_DEPS))
after_direct=$((AFTER_TOTAL - AFTER_DEPS))
delta_gosum=$((AFTER_GOSUM - BEFORE_GOSUM))
delta_direct=$((after_direct - before_direct))
delta_indirect=$((AFTER_DEPS - BEFORE_DEPS))
delta_kb=$(( (AFTER_SIZE - BEFORE_SIZE) / 1024 ))
delta_scanner_kb=$(( (AFTER_SCANNER_SIZE - BEFORE_SCANNER_SIZE) / 1024 ))
before_mb=$(awk "BEGIN{printf \"%.1f\", $BEFORE_SIZE/1048576}")
after_mb=$(awk "BEGIN{printf \"%.1f\", $AFTER_SIZE/1048576}")
before_scanner_mb=$(awk "BEGIN{printf \"%.1f\", $BEFORE_SCANNER_SIZE/1048576}")
after_scanner_mb=$(awk "BEGIN{printf \"%.1f\", $AFTER_SCANNER_SIZE/1048576}")
{
echo "## Diet Metrics"
echo "| Metric | Before | After | Delta |"
echo "|--------|--------|-------|-------|"
echo "| go.sum lines | $BEFORE_GOSUM | $AFTER_GOSUM | ${delta_gosum} |"
echo "| Direct deps | ${before_direct} | ${after_direct} | ${delta_direct} |"
echo "| Indirect deps | $BEFORE_DEPS | $AFTER_DEPS | ${delta_indirect} |"
echo "| Binary size (full) | ${before_mb}MB | ${after_mb}MB | ${delta_kb}KB |"
echo "| Binary size (scanner) | ${before_scanner_mb}MB | ${after_scanner_mb}MB | ${delta_scanner_kb}KB |"
} >> "$GITHUB_STEP_SUMMARY"
================================================
FILE: .github/workflows/docker-publish.yml
================================================
name: Publish Docker image
on:
push:
branches:
- 'master'
tags:
- '*'
permissions:
contents: read
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: AdityaGarg8/remove-unwanted-software@90e01b21170618765a73370fcc3abbd1684a7793 # v5
with:
remove-dotnet: "true"
remove-android: "true"
remove-haskell: "true"
remove-codeql: "true"
remove-docker-images: "true"
remove-large-packages: "true"
remove-cached-tools: "true"
remove-swapfile: "true"
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: vuls/vuls image meta
id: oss-meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: vuls/vuls
tags: |
type=ref,event=tag
- name: vuls/fvuls image meta
id: fvuls-meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: vuls/fvuls
tags: |
type=ref,event=tag
- name: Login to DockerHub
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: OSS image build and push
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
context: .
file: ./Dockerfile
push: true
tags: |
vuls/vuls:latest
${{ steps.oss-meta.outputs.tags }}
secrets: |
"github_token=${{ secrets.GITHUB_TOKEN }}"
platforms: linux/amd64,linux/arm64
- name: FutureVuls image build and push
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
context: .
file: ./contrib/Dockerfile
push: true
tags: |
vuls/fvuls:latest
${{ steps.fvuls-meta.outputs.tags }}
secrets: |
"github_token=${{ secrets.GITHUB_TOKEN }}"
platforms: linux/amd64,linux/arm64
================================================
FILE: .github/workflows/golangci.yml
================================================
name: golangci-lint
on:
push:
tags:
- v*
branches:
- master
pull_request:
permissions:
contents: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Go 1.x
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: v2.9.0
env:
GOEXPERIMENT: jsonv2
================================================
FILE: .github/workflows/goreleaser.yml
================================================
name: goreleaser
on:
push:
tags:
- '*'
permissions:
contents: read
id-token: none
jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: write # Needed for GoReleaser to create releases (tags, release notes, artifacts).
id-token: write # For cosign
steps:
- name: Cosign install
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
- name: Maximize build space
uses: AdityaGarg8/remove-unwanted-software@90e01b21170618765a73370fcc3abbd1684a7793 # v5
with:
remove-dotnet: "true"
remove-android: "true"
remove-haskell: "true"
remove-codeql: "true"
remove-docker-images: "true"
remove-large-packages: "true"
remove-cached-tools: "true"
remove-swapfile: "true"
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0
with:
distribution: goreleaser
version: latest
args: release --clean --timeout 60m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/scorecard.yml
================================================
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.
name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '26 21 * * 1'
push:
branches: [ "master" ]
# Declare default permissions as read only.
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
# `publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read
steps:
- name: "Checkout code"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecard on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true
# (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore
# file_mode: git
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
with:
sarif_file: results.sarif
================================================
FILE: .github/workflows/test.yml
================================================
name: Test
on: [pull_request]
permissions:
contents: read
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Go 1.x
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
- name: go mod tidy check
run: go mod tidy && git diff --exit-code
- name: Test
run: make test
================================================
FILE: .gitignore
================================================
.vscode
*.txt
*.swp
*.sqlite3*
*.db
*.toml
tags
.gitmodules
coverage.out
issues/
vendor/
log/
results
!setup/docker/*
.DS_Store
dist/
*.exe
.idea
vuls.*
vuls
!cmd/vuls
/future-vuls
/trivy-to-vuls
snmp2cpe
!snmp2cpe/
================================================
FILE: .golangci.yml
================================================
version: "2"
linters:
default: none
enable:
- errcheck
- govet
- ineffassign
- misspell
- prealloc
- revive
- staticcheck
settings:
misspell: # https://golangci-lint.run/usage/linters/#misspell
ignore-rules:
- "Criterias"
revive: # https://golangci-lint.run/usage/linters/#revive
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: empty-block
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: exported
- name: if-return
- name: increment-decrement
- name: indent-error-flow
- name: package-comments
disabled: true
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: superfluous-else
- name: time-naming
- name: unexported-return
- name: unreachable-code
- name: unused-parameter
- name: var-declaration
- name: var-naming
arguments:
- [] # AllowList
- [] # DenyList
- - skip-package-name-checks: true
staticcheck: # https://golangci-lint.run/usage/linters/#staticcheck
checks:
- all
- -ST1000 # at least one file in a package should have a package comment
- -ST1005 # error strings should not be capitalized
exclusions:
rules:
- source: "defer .+\\.Close\\(\\)"
linters:
- errcheck
- source: "defer os.Remove\\(.+\\)"
linters:
- errcheck
formatters:
enable:
- goimports
run:
timeout: 10m
================================================
FILE: .goreleaser.yml
================================================
version: 2
project_name: vuls
release:
github:
owner: future-architect
name: vuls
builds:
- id: vuls
env:
- CGO_ENABLED=0
- GOEXPERIMENT=jsonv2
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
main: ./cmd/vuls/main.go
flags:
- -a
- -trimpath
ldflags:
- -s -w -X github.com/future-architect/vuls/config.Version={{.Version}} -X github.com/future-architect/vuls/config.Revision={{.Commit}}-{{ .CommitDate }}
binary: vuls
- id: vuls-scanner
env:
- CGO_ENABLED=0
- GOEXPERIMENT=jsonv2
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
main: ./cmd/scanner/main.go
tags:
- scanner
flags:
- -a
- -trimpath
ldflags:
- -s -w -X github.com/future-architect/vuls/config.Version={{.Version}} -X github.com/future-architect/vuls/config.Revision={{.Commit}}-{{ .CommitDate }}
binary: vuls-scanner
- id: trivy-to-vuls
env:
- CGO_ENABLED=0
- GOEXPERIMENT=jsonv2
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
main: ./contrib/trivy/cmd/main.go
tags:
- scanner
flags:
- -a
- -trimpath
ldflags:
- -s -w -X github.com/future-architect/vuls/config.Version={{.Version}} -X github.com/future-architect/vuls/config.Revision={{.Commit}}-{{ .CommitDate }}
binary: trivy-to-vuls
- id: future-vuls
env:
- CGO_ENABLED=0
- GOEXPERIMENT=jsonv2
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
tags:
- scanner
flags:
- -a
- -trimpath
ldflags:
- -s -w -X github.com/future-architect/vuls/config.Version={{.Version}} -X github.com/future-architect/vuls/config.Revision={{.Commit}}-{{ .CommitDate }}
main: ./contrib/future-vuls/cmd/main.go
binary: future-vuls
- id: snmp2cpe
env:
- CGO_ENABLED=0
- GOEXPERIMENT=jsonv2
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
tags:
- scanner
flags:
- -a
- -trimpath
ldflags:
- -s -w -X github.com/future-architect/vuls/config.Version={{.Version}} -X github.com/future-architect/vuls/config.Revision={{.Commit}}-{{ .CommitDate }}
main: ./contrib/snmp2cpe/cmd/main.go
binary: snmp2cpe
archives:
- id: vuls
name_template: '{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
ids:
- vuls
formats: ['tar.gz']
files:
- LICENSE
- README*
- CHANGELOG.md
- id: vuls-scanner
name_template: '{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
ids:
- vuls-scanner
formats: ['tar.gz']
files:
- LICENSE
- README*
- CHANGELOG.md
- id: trivy-to-vuls
name_template: '{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
ids:
- trivy-to-vuls
formats: ['tar.gz']
files:
- LICENSE
- README*
- CHANGELOG.md
- id: future-vuls
name_template: '{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
ids:
- future-vuls
formats: ['tar.gz']
files:
- LICENSE
- README*
- CHANGELOG.md
- id: snmp2cpe
name_template: '{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
ids:
- snmp2cpe
formats: ['tar.gz']
files:
- LICENSE
- README*
- CHANGELOG.md
snapshot:
version_template: SNAPSHOT-{{ .Commit }}
signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
signature: "${artifact}.sigstore.json"
args:
- "sign-blob"
- "--bundle=${signature}"
- "${artifact}"
- "--yes"
artifacts: all
output: true
================================================
FILE: CHANGELOG.md
================================================
# Change Log
## v0.4.1 and later, see [GitHub release](https://github.com/future-architect/vuls/releases)
## [v0.4.0](https://github.com/future-architect/vuls/tree/v0.4.0) (2017-08-25)
[Full Changelog](https://github.com/future-architect/vuls/compare/v0.3.0...v0.4.0)
**Implemented enhancements:**
- Output changelog in report, TUI and JSON for RHEL [\#367](https://github.com/future-architect/vuls/issues/367)
- Output changelog in report, TUI and JSON for Amazon Linux [\#366](https://github.com/future-architect/vuls/issues/366)
- Improve scanning accuracy by checking package versions [\#256](https://github.com/future-architect/vuls/issues/256)
- Improve SSH [\#415](https://github.com/future-architect/vuls/issues/415)
- Enable to scan even if target server can not connect to the Internet [\#258](https://github.com/future-architect/vuls/issues/258)
- SSH Hostkey check [\#417](https://github.com/future-architect/vuls/pull/417) ([kotakanbe](https://github.com/kotakanbe))
- v0.4.0 [\#449](https://github.com/future-architect/vuls/pull/449) ([kotakanbe](https://github.com/kotakanbe))
- Change default ssh method from go library to external command [\#416](https://github.com/future-architect/vuls/pull/416) ([kotakanbe](https://github.com/kotakanbe))
- Add containers-only option to configtest [\#411](https://github.com/future-architect/vuls/pull/411) ([knqyf263](https://github.com/knqyf263))
**Fixed bugs:**
- Running Vuls tui before vuls report does not show vulnerabilities checked by CPE [\#396](https://github.com/future-architect/vuls/issues/396)
- With a long package name, Local shell mode \(stty dont' work\) [\#444](https://github.com/future-architect/vuls/issues/444)
- Improve SSH [\#415](https://github.com/future-architect/vuls/issues/415)
- Report that a vulnerability exists in the wrong package [\#408](https://github.com/future-architect/vuls/issues/408)
- With a long package name, a parse error occurs. [\#391](https://github.com/future-architect/vuls/issues/391)
- Ubuntu failed to scan vulnerable packages [\#205](https://github.com/future-architect/vuls/issues/205)
- CVE-ID in changelog can't be picked up. [\#154](https://github.com/future-architect/vuls/issues/154)
- v0.4.0 [\#449](https://github.com/future-architect/vuls/pull/449) ([kotakanbe](https://github.com/kotakanbe))
- Fix SSH dial error [\#413](https://github.com/future-architect/vuls/pull/413) ([kotakanbe](https://github.com/kotakanbe))
- Update deps, Change deps tool from glide to dep [\#412](https://github.com/future-architect/vuls/pull/412) ([kotakanbe](https://github.com/kotakanbe))
- fix report option Loaded error-info [\#406](https://github.com/future-architect/vuls/pull/406) ([hogehogehugahuga](https://github.com/hogehogehugahuga))
- Add --user root to docker exec command [\#389](https://github.com/future-architect/vuls/pull/389) ([PaulFurtado](https://github.com/PaulFurtado))
**Closed issues:**
- README.md.ja not include "Oracle Linux, FreeBSD" [\#465](https://github.com/future-architect/vuls/issues/465)
- Can't scan remote server - \(centos 7 - updated\) [\#451](https://github.com/future-architect/vuls/issues/451)
- An abnormality in the result of vuls tui [\#439](https://github.com/future-architect/vuls/issues/439)
- compile faild [\#436](https://github.com/future-architect/vuls/issues/436)
- Can't install vuls on CentOS 7 [\#432](https://github.com/future-architect/vuls/issues/432)
- Vuls scan doesn't show severity score in any of the vulnerable packages [\#430](https://github.com/future-architect/vuls/issues/430)
- Load config failedtoml: cannot load TOML value of type string into a Go slice [\#429](https://github.com/future-architect/vuls/issues/429)
- vuls scan not running check-update with sudo for Centos 7 [\#428](https://github.com/future-architect/vuls/issues/428)
- options for configtest not being activated [\#422](https://github.com/future-architect/vuls/issues/422)
- "could not find project Gopkg.toml, use dep init to initiate a manifest" when installing vuls [\#420](https://github.com/future-architect/vuls/issues/420)
- go get not get [\#407](https://github.com/future-architect/vuls/issues/407)
- Failed to scan via docker. err: Unknown format [\#404](https://github.com/future-architect/vuls/issues/404)
- Failed to scan - kernel-xxx is an installed security update [\#403](https://github.com/future-architect/vuls/issues/403)
- 169.254.169.254 port 80: Connection refused [\#402](https://github.com/future-architect/vuls/issues/402)
- vuls scan --debug cause `invalid memory address` error [\#397](https://github.com/future-architect/vuls/issues/397)
- Provide a command line flag that will automatically install aptitude on debian? [\#390](https://github.com/future-architect/vuls/issues/390)
**Merged pull requests:**
- export fill cve info [\#467](https://github.com/future-architect/vuls/pull/467) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- add oval docker [\#466](https://github.com/future-architect/vuls/pull/466) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- fix typos in commands. [\#464](https://github.com/future-architect/vuls/pull/464) ([ymomoi](https://github.com/ymomoi))
- Update README [\#463](https://github.com/future-architect/vuls/pull/463) ([kotakanbe](https://github.com/kotakanbe))
- export FillWithOval [\#462](https://github.com/future-architect/vuls/pull/462) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- add serveruuid field [\#458](https://github.com/future-architect/vuls/pull/458) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- add s3 dirctory option [\#457](https://github.com/future-architect/vuls/pull/457) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- Extract Advisory.Description on RHEL, Amazon, Oracle [\#450](https://github.com/future-architect/vuls/pull/450) ([kotakanbe](https://github.com/kotakanbe))
- nosudo on CentOS and Fetch Changelogs on Amazon, RHEL [\#448](https://github.com/future-architect/vuls/pull/448) ([kotakanbe](https://github.com/kotakanbe))
- change logrus package to lowercase and update other packages [\#446](https://github.com/future-architect/vuls/pull/446) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- add db backend redis [\#445](https://github.com/future-architect/vuls/pull/445) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- fast test [\#435](https://github.com/future-architect/vuls/pull/435) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- fix typo [\#433](https://github.com/future-architect/vuls/pull/433) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- Add support for PostgreSQL as a DB storage back-end [\#431](https://github.com/future-architect/vuls/pull/431) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- typo README.js.md [\#426](https://github.com/future-architect/vuls/pull/426) ([ryurock](https://github.com/ryurock))
- Add TOC to README [\#425](https://github.com/future-architect/vuls/pull/425) ([kotakanbe](https://github.com/kotakanbe))
- Fixing \#420 where lock and manifest have moved to TOML [\#421](https://github.com/future-architect/vuls/pull/421) ([elfgoh](https://github.com/elfgoh))
- Define timeout for vulnerabilities scan and platform detection [\#414](https://github.com/future-architect/vuls/pull/414) ([s7anley](https://github.com/s7anley))
- Enable -timeout option when detecting OS [\#410](https://github.com/future-architect/vuls/pull/410) ([knqyf263](https://github.com/knqyf263))
- Remove duplicate command in README [\#401](https://github.com/future-architect/vuls/pull/401) ([knqyf263](https://github.com/knqyf263))
- Fix to read config.toml at tui [\#441](https://github.com/future-architect/vuls/pull/441) ([usiusi360](https://github.com/usiusi360))
- Change NVD URL to new one [\#419](https://github.com/future-architect/vuls/pull/419) ([kotakanbe](https://github.com/kotakanbe))
- Add some testcases [\#418](https://github.com/future-architect/vuls/pull/418) ([kotakanbe](https://github.com/kotakanbe))
## [v0.3.0](https://github.com/future-architect/vuls/tree/v0.3.0) (2017-03-24)
[Full Changelog](https://github.com/future-architect/vuls/compare/v0.2.0...v0.3.0)
**Implemented enhancements:**
- Changelog parsing fails when package maintainers aren't consistent regarding versions [\#327](https://github.com/future-architect/vuls/issues/327)
- Docker scan doesn't report image name [\#325](https://github.com/future-architect/vuls/issues/325)
- vuls report -to-email only one E-Mail [\#295](https://github.com/future-architect/vuls/issues/295)
- Support RHEL5 [\#286](https://github.com/future-architect/vuls/issues/286)
- Continue scanning even when some hosts have tech issues? [\#264](https://github.com/future-architect/vuls/issues/264)
- Normalization of JSON output [\#259](https://github.com/future-architect/vuls/issues/259)
- Add report subcommand, change scan subcommand options [\#239](https://github.com/future-architect/vuls/issues/239)
- scan localhost? [\#210](https://github.com/future-architect/vuls/issues/210)
- Can Vuls show details about updateable packages [\#341](https://github.com/future-architect/vuls/issues/341)
- Scan all containers except [\#285](https://github.com/future-architect/vuls/issues/285)
- Notify the difference from the previous scan result [\#255](https://github.com/future-architect/vuls/issues/255)
- EC2RoleCreds support? [\#250](https://github.com/future-architect/vuls/issues/250)
- Output confidence score of detection accuracy and detection method to JSON or Reporting [\#350](https://github.com/future-architect/vuls/pull/350) ([kotakanbe](https://github.com/kotakanbe))
- Avoid null slice being null in JSON [\#345](https://github.com/future-architect/vuls/pull/345) ([kotakanbe](https://github.com/kotakanbe))
- Add -format-one-email option [\#331](https://github.com/future-architect/vuls/pull/331) ([knqyf263](https://github.com/knqyf263))
- Support Raspbian [\#330](https://github.com/future-architect/vuls/pull/330) ([knqyf263](https://github.com/knqyf263))
- Add leniancy to the version matching for debian to account for versio… [\#328](https://github.com/future-architect/vuls/pull/328) ([jsulinski](https://github.com/jsulinski))
- Add image information for docker containers [\#326](https://github.com/future-architect/vuls/pull/326) ([jsulinski](https://github.com/jsulinski))
- Continue scanning even when some hosts have tech issues [\#309](https://github.com/future-architect/vuls/pull/309) ([kotakanbe](https://github.com/kotakanbe))
- Add -log-dir option [\#301](https://github.com/future-architect/vuls/pull/301) ([knqyf263](https://github.com/knqyf263))
- Use --assumeno option [\#300](https://github.com/future-architect/vuls/pull/300) ([knqyf263](https://github.com/knqyf263))
- Add local scan mode\(Scan without SSH when target server is localhost\) [\#291](https://github.com/future-architect/vuls/pull/291) ([kotakanbe](https://github.com/kotakanbe))
- Support RHEL5 [\#289](https://github.com/future-architect/vuls/pull/289) ([kotakanbe](https://github.com/kotakanbe))
- Add LXD support [\#288](https://github.com/future-architect/vuls/pull/288) ([jiazio](https://github.com/jiazio))
- Add timeout option to configtest [\#400](https://github.com/future-architect/vuls/pull/400) ([kotakanbe](https://github.com/kotakanbe))
- Notify the difference from the previous scan result [\#392](https://github.com/future-architect/vuls/pull/392) ([knqyf263](https://github.com/knqyf263))
- Add Oracle Linux support [\#386](https://github.com/future-architect/vuls/pull/386) ([Djelibeybi](https://github.com/Djelibeybi))
- Change container scan format in config.toml [\#381](https://github.com/future-architect/vuls/pull/381) ([kotakanbe](https://github.com/kotakanbe))
- Obsolete CentOS5 support [\#378](https://github.com/future-architect/vuls/pull/378) ([kotakanbe](https://github.com/kotakanbe))
- Deprecate prepare subcommand to minimize the root authority defined by /etc/sudoers [\#375](https://github.com/future-architect/vuls/pull/375) ([kotakanbe](https://github.com/kotakanbe))
- Support IAM role for report to S3. [\#370](https://github.com/future-architect/vuls/pull/370) ([ohsawa0515](https://github.com/ohsawa0515))
- Add .travis.yml [\#363](https://github.com/future-architect/vuls/pull/363) ([knqyf263](https://github.com/knqyf263))
- Output changelog in report, TUI and JSON for Ubuntu/Debian/CentOS [\#356](https://github.com/future-architect/vuls/pull/356) ([kotakanbe](https://github.com/kotakanbe))
**Fixed bugs:**
- Debian scans failing in docker [\#323](https://github.com/future-architect/vuls/issues/323)
- Local CVE DB is still checked, even if a CVE Dictionary URL is defined [\#316](https://github.com/future-architect/vuls/issues/316)
- vuls needs gmake. [\#313](https://github.com/future-architect/vuls/issues/313)
- patch request for FreeBSD [\#312](https://github.com/future-architect/vuls/issues/312)
- Report: failed to read from json \(Docker\) [\#294](https://github.com/future-architect/vuls/issues/294)
- -report-mail option does not output required mail header [\#282](https://github.com/future-architect/vuls/issues/282)
- PackInfo not found error when vuls scan. [\#281](https://github.com/future-architect/vuls/issues/281)
- Normalize character set [\#279](https://github.com/future-architect/vuls/issues/279)
- The number of Updatable Packages is different from the number of yum check-update [\#373](https://github.com/future-architect/vuls/issues/373)
- sudo is needed when exec yum check-update on RHEL7 [\#371](https://github.com/future-architect/vuls/issues/371)
- `123-3ubuntu4` should be marked as ChangelogLenientMatch [\#362](https://github.com/future-architect/vuls/issues/362)
- CentOS multi package invalid result [\#360](https://github.com/future-architect/vuls/issues/360)
- Parse error after check-update. \(Unknown format\) [\#359](https://github.com/future-architect/vuls/issues/359)
- Fix candidate to confidence. [\#354](https://github.com/future-architect/vuls/pull/354) ([kotakanbe](https://github.com/kotakanbe))
- Bug fix: not send e-mail to cc address [\#346](https://github.com/future-architect/vuls/pull/346) ([knqyf263](https://github.com/knqyf263))
- Change the command used for os detection from uname to freebsd-version [\#340](https://github.com/future-architect/vuls/pull/340) ([kotakanbe](https://github.com/kotakanbe))
- Fix error handling of detectOS [\#337](https://github.com/future-architect/vuls/pull/337) ([kotakanbe](https://github.com/kotakanbe))
- Fix infinite retry at size overrun error in Slack report [\#329](https://github.com/future-architect/vuls/pull/329) ([kotakanbe](https://github.com/kotakanbe))
- aptitude changelog defaults to using more, which is not interactive a… [\#324](https://github.com/future-architect/vuls/pull/324) ([jsulinski](https://github.com/jsulinski))
- Do not use sudo when echo [\#322](https://github.com/future-architect/vuls/pull/322) ([knqyf263](https://github.com/knqyf263))
- Reduce privilege requirements for commands that don't need sudo on Ubuntu/Debian [\#319](https://github.com/future-architect/vuls/pull/319) ([jsulinski](https://github.com/jsulinski))
- Don't check for a CVE DB when CVE Dictionary URL is defined [\#317](https://github.com/future-architect/vuls/pull/317) ([jsulinski](https://github.com/jsulinski))
- Fix typo contianer -\> container [\#314](https://github.com/future-architect/vuls/pull/314) ([justyns](https://github.com/justyns))
- Fix the changelog cache logic for ubuntu/debian [\#305](https://github.com/future-architect/vuls/pull/305) ([kotakanbe](https://github.com/kotakanbe))
- Fix yum updateinfo options [\#304](https://github.com/future-architect/vuls/pull/304) ([kotakanbe](https://github.com/kotakanbe))
- Update glide.lock to fix create-log-dir error. [\#303](https://github.com/future-architect/vuls/pull/303) ([kotakanbe](https://github.com/kotakanbe))
- Fix a bug in logging \(file output\) at scan command [\#302](https://github.com/future-architect/vuls/pull/302) ([kotakanbe](https://github.com/kotakanbe))
- Add -pipe flag \#294 [\#299](https://github.com/future-architect/vuls/pull/299) ([kotakanbe](https://github.com/kotakanbe))
- Fix RHEL5 scan stopped halfway [\#293](https://github.com/future-architect/vuls/pull/293) ([kotakanbe](https://github.com/kotakanbe))
- Fix amazon linux scan stopped halfway [\#292](https://github.com/future-architect/vuls/pull/292) ([kotakanbe](https://github.com/kotakanbe))
- Fix nil-ponter in TUI [\#388](https://github.com/future-architect/vuls/pull/388) ([kotakanbe](https://github.com/kotakanbe))
- Fix Bug of Mysql Backend [\#384](https://github.com/future-architect/vuls/pull/384) ([kotakanbe](https://github.com/kotakanbe))
- Fix scan confidence on Ubuntu/Debian/Raspbian \#362 [\#379](https://github.com/future-architect/vuls/pull/379) ([kotakanbe](https://github.com/kotakanbe))
- Fix updatalbe packages count \#373 [\#374](https://github.com/future-architect/vuls/pull/374) ([kotakanbe](https://github.com/kotakanbe))
- sudo yum check-update on RHEL [\#372](https://github.com/future-architect/vuls/pull/372) ([kotakanbe](https://github.com/kotakanbe))
- Change ssh option from -t to -tt [\#369](https://github.com/future-architect/vuls/pull/369) ([knqyf263](https://github.com/knqyf263))
- Increase the width of RequestPty [\#364](https://github.com/future-architect/vuls/pull/364) ([knqyf263](https://github.com/knqyf263))
**Closed issues:**
- vuls configtest --debugがsudoのチェックで止まってしまう [\#395](https://github.com/future-architect/vuls/issues/395)
- Add support for Oracle Linux [\#385](https://github.com/future-architect/vuls/issues/385)
- error on install - Ubuntu 16.04 [\#376](https://github.com/future-architect/vuls/issues/376)
- Unknown OS Type [\#335](https://github.com/future-architect/vuls/issues/335)
- mac os 10.12.3 make install error [\#334](https://github.com/future-architect/vuls/issues/334)
- assumeYes doesn't work because there is no else condition [\#320](https://github.com/future-architect/vuls/issues/320)
- Debian scan uses sudo where unnecessary [\#318](https://github.com/future-architect/vuls/issues/318)
- Add FreeBSD 11 to supported OS on documents. [\#311](https://github.com/future-architect/vuls/issues/311)
- docker fetchnvd failing [\#274](https://github.com/future-architect/vuls/issues/274)
- Latest version of labstack echo breaks installation [\#268](https://github.com/future-architect/vuls/issues/268)
- fetchnvd Fails using example loop [\#267](https://github.com/future-architect/vuls/issues/267)
**Merged pull requests:**
- fix typo in README.ja.md [\#394](https://github.com/future-architect/vuls/pull/394) ([lv7777](https://github.com/lv7777))
- Update Tutorial in README [\#387](https://github.com/future-architect/vuls/pull/387) ([kotakanbe](https://github.com/kotakanbe))
- Fix README [\#383](https://github.com/future-architect/vuls/pull/383) ([usiusi360](https://github.com/usiusi360))
- s/dictinary/dictionary typo [\#382](https://github.com/future-architect/vuls/pull/382) ([beuno](https://github.com/beuno))
- Fix Japanese typo [\#377](https://github.com/future-architect/vuls/pull/377) ([IMAI-Yuji](https://github.com/IMAI-Yuji))
- Improve kanji character [\#351](https://github.com/future-architect/vuls/pull/351) ([hasegawa-tomoki](https://github.com/hasegawa-tomoki))
- Add PULL\_REQUEST\_TEMPLATE.md [\#348](https://github.com/future-architect/vuls/pull/348) ([knqyf263](https://github.com/knqyf263))
- Update README [\#347](https://github.com/future-architect/vuls/pull/347) ([knqyf263](https://github.com/knqyf263))
- Fix test case [\#344](https://github.com/future-architect/vuls/pull/344) ([kotakanbe](https://github.com/kotakanbe))
- Fix typo [\#343](https://github.com/future-architect/vuls/pull/343) ([knqyf263](https://github.com/knqyf263))
- Rename Makefile to GNUmakefile \#313 [\#339](https://github.com/future-architect/vuls/pull/339) ([kotakanbe](https://github.com/kotakanbe))
- Update README [\#338](https://github.com/future-architect/vuls/pull/338) ([kotakanbe](https://github.com/kotakanbe))
- add error handling [\#332](https://github.com/future-architect/vuls/pull/332) ([kazuminn](https://github.com/kazuminn))
- Update readme [\#308](https://github.com/future-architect/vuls/pull/308) ([lapthorn](https://github.com/lapthorn))
- Update glide.lock to fix import error [\#306](https://github.com/future-architect/vuls/pull/306) ([knqyf263](https://github.com/knqyf263))
- Check whether echo is executable with nopasswd [\#298](https://github.com/future-architect/vuls/pull/298) ([knqyf263](https://github.com/knqyf263))
- Update docker README [\#297](https://github.com/future-architect/vuls/pull/297) ([knqyf263](https://github.com/knqyf263))
- update readme [\#296](https://github.com/future-architect/vuls/pull/296) ([galigalikun](https://github.com/galigalikun))
- remove unused import line. [\#358](https://github.com/future-architect/vuls/pull/358) ([ymomoi](https://github.com/ymomoi))
## [v0.2.0](https://github.com/future-architect/vuls/tree/v0.2.0) (2017-01-10)
[Full Changelog](https://github.com/future-architect/vuls/compare/v0.1.7...v0.2.0)
**Implemented enhancements:**
- Add report subcommand, change scan options. \#239 [\#270](https://github.com/future-architect/vuls/pull/270) ([kotakanbe](https://github.com/kotakanbe))
- Add --assume-yes to prepare \#260 [\#266](https://github.com/future-architect/vuls/pull/266) ([Code0x58](https://github.com/Code0x58))
- Use RFC3339 timestamps in the results [\#265](https://github.com/future-architect/vuls/pull/265) ([Code0x58](https://github.com/Code0x58))
**Fixed bugs:**
- vuls prepare failed to centos7 [\#275](https://github.com/future-architect/vuls/issues/275)
- Failed to scan on RHEL5 [\#94](https://github.com/future-architect/vuls/issues/94)
- Fix container os detection [\#287](https://github.com/future-architect/vuls/pull/287) ([jiazio](https://github.com/jiazio))
- Add date header to report mail. [\#283](https://github.com/future-architect/vuls/pull/283) ([ymomoi](https://github.com/ymomoi))
- Add Content-Type header to report/mail.go . [\#280](https://github.com/future-architect/vuls/pull/280) ([hogehogehugahuga](https://github.com/hogehogehugahuga))
- Keep output of "vuls scan -report-\*" to be same every times [\#272](https://github.com/future-architect/vuls/pull/272) ([yoheimuta](https://github.com/yoheimuta))
- Fix JSON-dir regex pattern \#265 [\#271](https://github.com/future-architect/vuls/pull/271) ([kotakanbe](https://github.com/kotakanbe))
- Stop quietly ignoring `--ssh-external` on Windows [\#263](https://github.com/future-architect/vuls/pull/263) ([Code0x58](https://github.com/Code0x58))
- Fix non-interactive `apt-get install` \#251 [\#253](https://github.com/future-architect/vuls/pull/253) ([Code0x58](https://github.com/Code0x58))
**Closed issues:**
- gocui.NewGui now takes a parameter [\#261](https://github.com/future-architect/vuls/issues/261)
- Add a `--yes` flag to bypass interactive prompt for `vuls prepare` [\#260](https://github.com/future-architect/vuls/issues/260)
- `vuls prepare` doesn't work on Debian host due to apt-get confirmation prompt [\#251](https://github.com/future-architect/vuls/issues/251)
**Merged pull requests:**
- Fix gocui.NewGui after signature change \#261 [\#262](https://github.com/future-architect/vuls/pull/262) ([Code0x58](https://github.com/Code0x58))
- Replace inconsistent tabs with spaces [\#254](https://github.com/future-architect/vuls/pull/254) ([Code0x58](https://github.com/Code0x58))
- Fix README [\#249](https://github.com/future-architect/vuls/pull/249) ([usiusi360](https://github.com/usiusi360))
## [v0.1.7](https://github.com/future-architect/vuls/tree/v0.1.7) (2016-11-08)
[Full Changelog](https://github.com/future-architect/vuls/compare/v0.1.6...v0.1.7)
**Implemented enhancements:**
- Enable to scan only docker container, without docker host [\#122](https://github.com/future-architect/vuls/issues/122)
- Add -skip-broken option \[CentOS only\] \#245 [\#248](https://github.com/future-architect/vuls/pull/248) ([kotakanbe](https://github.com/kotakanbe))
- Display unknown CVEs to TUI [\#244](https://github.com/future-architect/vuls/pull/244) ([kotakanbe](https://github.com/kotakanbe))
- Add the XML output [\#240](https://github.com/future-architect/vuls/pull/240) ([gleentea](https://github.com/gleentea))
- add '-ssh-external' option to prepare subcommand [\#234](https://github.com/future-architect/vuls/pull/234) ([mykstmhr](https://github.com/mykstmhr))
- Integrate OWASP Dependency Check [\#232](https://github.com/future-architect/vuls/pull/232) ([kotakanbe](https://github.com/kotakanbe))
- Add support for reading CVE data from MySQL. [\#225](https://github.com/future-architect/vuls/pull/225) ([oswell](https://github.com/oswell))
- Remove base docker image, -v shows commit hash [\#223](https://github.com/future-architect/vuls/pull/223) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- Support ignore CveIDs in config [\#222](https://github.com/future-architect/vuls/pull/222) ([kotakanbe](https://github.com/kotakanbe))
- Confirm before installing dependencies on prepare [\#219](https://github.com/future-architect/vuls/pull/219) ([kotakanbe](https://github.com/kotakanbe))
- Remove all.json [\#218](https://github.com/future-architect/vuls/pull/218) ([kotakanbe](https://github.com/kotakanbe))
- Add GitHub issue template [\#217](https://github.com/future-architect/vuls/pull/217) ([kotakanbe](https://github.com/kotakanbe))
- Improve makefile, -version shows git hash, fix README [\#216](https://github.com/future-architect/vuls/pull/216) ([kotakanbe](https://github.com/kotakanbe))
- change e-mail package from gomail to net/smtp [\#211](https://github.com/future-architect/vuls/pull/211) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- Add only-containers option to scan subcommand \#122 [\#190](https://github.com/future-architect/vuls/pull/190) ([kotakanbe](https://github.com/kotakanbe))
- Fix -results-dir option of scan subcommand [\#185](https://github.com/future-architect/vuls/pull/185) ([kotakanbe](https://github.com/kotakanbe))
- Show error when no scannable servers are detected. [\#177](https://github.com/future-architect/vuls/pull/177) ([kotakanbe](https://github.com/kotakanbe))
- Add sudo check to prepare subcommand [\#176](https://github.com/future-architect/vuls/pull/176) ([kotakanbe](https://github.com/kotakanbe))
- Supports yum --enablerepo option \(supports only base,updates for now\) [\#147](https://github.com/future-architect/vuls/pull/147) ([kotakanbe](https://github.com/kotakanbe))
**Fixed bugs:**
- Debian 8.6 \(jessie\) scan does not show vulnerable packages [\#235](https://github.com/future-architect/vuls/issues/235)
- panic: runtime error: index out of range - ubuntu 16.04 + vuls history [\#180](https://github.com/future-architect/vuls/issues/180)
- Moved golang.org/x/net/context to context [\#243](https://github.com/future-architect/vuls/pull/243) ([yoheimuta](https://github.com/yoheimuta))
- Fix changelog cache bug on Ubuntu and Debian \#235 [\#238](https://github.com/future-architect/vuls/pull/238) ([kotakanbe](https://github.com/kotakanbe))
- add '-ssh-external' option to prepare subcommand [\#234](https://github.com/future-architect/vuls/pull/234) ([mykstmhr](https://github.com/mykstmhr))
- Fixed error for the latest version of gocui [\#231](https://github.com/future-architect/vuls/pull/231) ([ymd38](https://github.com/ymd38))
- Handle the refactored gocui SetCurrentView method. [\#229](https://github.com/future-architect/vuls/pull/229) ([oswell](https://github.com/oswell))
- Fix locale env var LANG to LANGUAGE [\#215](https://github.com/future-architect/vuls/pull/215) ([kotakanbe](https://github.com/kotakanbe))
- Fixed bug with parsing update line on CentOS/RHEL [\#206](https://github.com/future-architect/vuls/pull/206) ([andyone](https://github.com/andyone))
- Fix defer cache.DB.close [\#201](https://github.com/future-architect/vuls/pull/201) ([kotakanbe](https://github.com/kotakanbe))
- Fix a help message of -report-azure-blob option [\#195](https://github.com/future-architect/vuls/pull/195) ([kotakanbe](https://github.com/kotakanbe))
- Fix error handling in tui [\#193](https://github.com/future-architect/vuls/pull/193) ([kotakanbe](https://github.com/kotakanbe))
- Fix not working changelog cache on Container [\#189](https://github.com/future-architect/vuls/pull/189) ([kotakanbe](https://github.com/kotakanbe))
- Fix release version detection on FreeBSD [\#184](https://github.com/future-architect/vuls/pull/184) ([kotakanbe](https://github.com/kotakanbe))
- Fix defer cahce.DB.close\(\) [\#183](https://github.com/future-architect/vuls/pull/183) ([kotakanbe](https://github.com/kotakanbe))
- Fix a mode of files/dir \(report, log\) [\#182](https://github.com/future-architect/vuls/pull/182) ([kotakanbe](https://github.com/kotakanbe))
- Fix a error when no json dirs are found under results \#180 [\#181](https://github.com/future-architect/vuls/pull/181) ([kotakanbe](https://github.com/kotakanbe))
- ssh-external option of configtest is not working \#178 [\#179](https://github.com/future-architect/vuls/pull/179) ([kotakanbe](https://github.com/kotakanbe))
**Closed issues:**
- --enable-repos of yum option [\#246](https://github.com/future-architect/vuls/issues/246)
- --skip-broken at yum option [\#245](https://github.com/future-architect/vuls/issues/245)
- Recent changes to gobui cause build failures [\#228](https://github.com/future-architect/vuls/issues/228)
- https://hub.docker.com/r/vuls/go-cve-dictionary/ is empty [\#208](https://github.com/future-architect/vuls/issues/208)
- Not able to install gomail fails [\#202](https://github.com/future-architect/vuls/issues/202)
- No results file created - vuls tui failed [\#199](https://github.com/future-architect/vuls/issues/199)
- Wrong file permissions for results/\*.json in official Docker container [\#197](https://github.com/future-architect/vuls/issues/197)
- Failed: Unknown OS Type [\#196](https://github.com/future-architect/vuls/issues/196)
- Segmentation fault with configtest [\#192](https://github.com/future-architect/vuls/issues/192)
- Failed to scan. err: No server defined. Check the configuration [\#187](https://github.com/future-architect/vuls/issues/187)
- vuls configtest -ssh-external doesnt work [\#178](https://github.com/future-architect/vuls/issues/178)
- apt-get update: time out [\#175](https://github.com/future-architect/vuls/issues/175)
- scanning on Centos6, but vuls recognizes debian. [\#174](https://github.com/future-architect/vuls/issues/174)
- Fix READMEja \#164 [\#173](https://github.com/future-architect/vuls/issues/173)
**Merged pull requests:**
- Update README \#225 [\#242](https://github.com/future-architect/vuls/pull/242) ([kotakanbe](https://github.com/kotakanbe))
- fix readme [\#241](https://github.com/future-architect/vuls/pull/241) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- Fix README \#234 [\#237](https://github.com/future-architect/vuls/pull/237) ([kotakanbe](https://github.com/kotakanbe))
- Update glide files [\#236](https://github.com/future-architect/vuls/pull/236) ([kotakanbe](https://github.com/kotakanbe))
- fix README [\#226](https://github.com/future-architect/vuls/pull/226) ([usiusi360](https://github.com/usiusi360))
- fix some misspelling. [\#221](https://github.com/future-architect/vuls/pull/221) ([ymomoi](https://github.com/ymomoi))
- fix docker readme [\#214](https://github.com/future-architect/vuls/pull/214) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- Fix ja document about typo [\#213](https://github.com/future-architect/vuls/pull/213) ([shokohara](https://github.com/shokohara))
- fix readme [\#212](https://github.com/future-architect/vuls/pull/212) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- fix README [\#207](https://github.com/future-architect/vuls/pull/207) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- fix typo [\#204](https://github.com/future-architect/vuls/pull/204) ([usiusi360](https://github.com/usiusi360))
- fix gitignore [\#191](https://github.com/future-architect/vuls/pull/191) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- Update glide.lock [\#188](https://github.com/future-architect/vuls/pull/188) ([kotakanbe](https://github.com/kotakanbe))
- Fix path in setup/docker/README [\#186](https://github.com/future-architect/vuls/pull/186) ([dladuke](https://github.com/dladuke))
- Vuls and vulsrepo are now separated [\#163](https://github.com/future-architect/vuls/pull/163) ([hikachan](https://github.com/hikachan))
## [v0.1.6](https://github.com/future-architect/vuls/tree/v0.1.6) (2016-09-12)
[Full Changelog](https://github.com/future-architect/vuls/compare/v0.1.5...v0.1.6)
**Implemented enhancements:**
- High speed scan on Ubuntu/Debian [\#172](https://github.com/future-architect/vuls/pull/172) ([kotakanbe](https://github.com/kotakanbe))
- Support CWE\(Common Weakness Enumeration\) [\#169](https://github.com/future-architect/vuls/pull/169) ([kotakanbe](https://github.com/kotakanbe))
- Enable to scan without sudo on amazon linux [\#167](https://github.com/future-architect/vuls/pull/167) ([kotakanbe](https://github.com/kotakanbe))
- Remove deprecated options -use-unattended-upgrades,-use-yum-plugin-security [\#161](https://github.com/future-architect/vuls/pull/161) ([kotakanbe](https://github.com/kotakanbe))
- delete sqlite3 [\#152](https://github.com/future-architect/vuls/pull/152) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
**Fixed bugs:**
- Failed to setup vuls docker [\#170](https://github.com/future-architect/vuls/issues/170)
- yum check-update error occurred when no reboot after kernel updating [\#165](https://github.com/future-architect/vuls/issues/165)
- error thrown from 'docker build .' [\#157](https://github.com/future-architect/vuls/issues/157)
- CVE-ID is truncated to 4 digits [\#153](https://github.com/future-architect/vuls/issues/153)
- 'yum update --changelog' stalled in 'vuls scan'. if ssh user is not 'root'. [\#150](https://github.com/future-architect/vuls/issues/150)
- Panic on packet scan [\#131](https://github.com/future-architect/vuls/issues/131)
- Update glide.lock \#170 [\#171](https://github.com/future-architect/vuls/pull/171) ([kotakanbe](https://github.com/kotakanbe))
- Fix detecting a platform on Azure [\#168](https://github.com/future-architect/vuls/pull/168) ([kotakanbe](https://github.com/kotakanbe))
- Fix parse error for yum check-update \#165 [\#166](https://github.com/future-architect/vuls/pull/166) ([kotakanbe](https://github.com/kotakanbe))
- Fix bug: Vuls on Docker [\#159](https://github.com/future-architect/vuls/pull/159) ([tjinjin](https://github.com/tjinjin))
- Fix CVE-ID is truncated to 4 digits [\#155](https://github.com/future-architect/vuls/pull/155) ([usiusi360](https://github.com/usiusi360))
- Fix yum update --changelog stalled when non-root ssh user on CentOS \#150 [\#151](https://github.com/future-architect/vuls/pull/151) ([kotakanbe](https://github.com/kotakanbe))
**Closed issues:**
- Support su for root privilege escalation [\#44](https://github.com/future-architect/vuls/issues/44)
- Support FreeBSD [\#34](https://github.com/future-architect/vuls/issues/34)
**Merged pull requests:**
- Change scripts for data fetching from jvn [\#164](https://github.com/future-architect/vuls/pull/164) ([kotakanbe](https://github.com/kotakanbe))
- Fix: setup vulsrepo [\#162](https://github.com/future-architect/vuls/pull/162) ([tjinjin](https://github.com/tjinjin))
- Fix-docker-vulsrepo-install [\#160](https://github.com/future-architect/vuls/pull/160) ([usiusi360](https://github.com/usiusi360))
- Reduce regular expression compilation [\#158](https://github.com/future-architect/vuls/pull/158) ([itchyny](https://github.com/itchyny))
- Add testcases for \#153 [\#156](https://github.com/future-architect/vuls/pull/156) ([kotakanbe](https://github.com/kotakanbe))
## [v0.1.5](https://github.com/future-architect/vuls/tree/v0.1.5) (2016-08-16)
[Full Changelog](https://github.com/future-architect/vuls/compare/v0.1.4...v0.1.5)
**Implemented enhancements:**
- Enable to scan without running go-cve-dictionary as server mode [\#84](https://github.com/future-architect/vuls/issues/84)
- Support high-speed scanning for CentOS [\#138](https://github.com/future-architect/vuls/pull/138) ([tai-ga](https://github.com/tai-ga))
- Add configtest subcommand. skip un-ssh-able servers. [\#134](https://github.com/future-architect/vuls/pull/134) ([kotakanbe](https://github.com/kotakanbe))
- Support -report-azure-blob option [\#130](https://github.com/future-architect/vuls/pull/130) ([kotakanbe](https://github.com/kotakanbe))
- Add optional key-values that will be outputted to JSON in config [\#117](https://github.com/future-architect/vuls/pull/117) ([kotakanbe](https://github.com/kotakanbe))
- Change dir structure [\#115](https://github.com/future-architect/vuls/pull/115) ([kotakanbe](https://github.com/kotakanbe))
- Add some validation of loading config. user, host and port [\#113](https://github.com/future-architect/vuls/pull/113) ([kotakanbe](https://github.com/kotakanbe))
- Support scanning with external ssh command [\#101](https://github.com/future-architect/vuls/pull/101) ([kotakanbe](https://github.com/kotakanbe))
- Detect Platform and get instance-id of amazon ec2 [\#95](https://github.com/future-architect/vuls/pull/95) ([kotakanbe](https://github.com/kotakanbe))
- Add -report-s3 option [\#92](https://github.com/future-architect/vuls/pull/92) ([kotakanbe](https://github.com/kotakanbe))
- Added FreeBSD support. [\#90](https://github.com/future-architect/vuls/pull/90) ([justyntemme](https://github.com/justyntemme))
- Add glide files for vendoring [\#89](https://github.com/future-architect/vuls/pull/89) ([kotakanbe](https://github.com/kotakanbe))
- Fix README, change -cvedbpath to -cve-dictionary-dbpath \#84 [\#85](https://github.com/future-architect/vuls/pull/85) ([kotakanbe](https://github.com/kotakanbe))
- Add option for it get cve detail from cve.sqlite3. [\#81](https://github.com/future-architect/vuls/pull/81) ([ymd38](https://github.com/ymd38))
- Add -report-text option, Fix small bug of report in japanese [\#78](https://github.com/future-architect/vuls/pull/78) ([kotakanbe](https://github.com/kotakanbe))
- Add JSONWriter, Fix CVE sort order of report [\#77](https://github.com/future-architect/vuls/pull/77) ([kotakanbe](https://github.com/kotakanbe))
**Fixed bugs:**
- Docker: Panic [\#76](https://github.com/future-architect/vuls/issues/76)
- Fix apt command to scan correctly when system locale is not english [\#149](https://github.com/future-architect/vuls/pull/149) ([kit494way](https://github.com/kit494way))
- Disable -ask-sudo-password for security reasons [\#148](https://github.com/future-architect/vuls/pull/148) ([kotakanbe](https://github.com/kotakanbe))
- Fix no tty error while executing with -external-ssh option [\#143](https://github.com/future-architect/vuls/pull/143) ([kotakanbe](https://github.com/kotakanbe))
- wrong log packages [\#141](https://github.com/future-architect/vuls/pull/141) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- Fix platform detection. [\#137](https://github.com/future-architect/vuls/pull/137) ([Rompei](https://github.com/Rompei))
- Fix nil pointer when scan with -cve-dictionary-dbpath and cpeNames [\#111](https://github.com/future-architect/vuls/pull/111) ([kotakanbe](https://github.com/kotakanbe))
- Remove vulndb file before pkg audit [\#110](https://github.com/future-architect/vuls/pull/110) ([kotakanbe](https://github.com/kotakanbe))
- Add error handling when unable to connect via ssh. status code: 255 [\#108](https://github.com/future-architect/vuls/pull/108) ([kotakanbe](https://github.com/kotakanbe))
- Enable to detect vulnerabilities on FreeBSD [\#98](https://github.com/future-architect/vuls/pull/98) ([kotakanbe](https://github.com/kotakanbe))
- Fix unknown format err while check-update on RHEL6.5 [\#93](https://github.com/future-architect/vuls/pull/93) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- Fix type of SMTP Port of discovery command's output [\#88](https://github.com/future-architect/vuls/pull/88) ([kotakanbe](https://github.com/kotakanbe))
- Fix error msg when go-cve-dictionary is unavailable \#84 [\#86](https://github.com/future-architect/vuls/pull/86) ([kotakanbe](https://github.com/kotakanbe))
- Fix error handling to avoid nil pointer err on debian [\#83](https://github.com/future-architect/vuls/pull/83) ([kotakanbe](https://github.com/kotakanbe))
- Fix nil pointer while doing apt-cache policy on ubuntu \#76 [\#82](https://github.com/future-architect/vuls/pull/82) ([kotakanbe](https://github.com/kotakanbe))
- fix log import url [\#79](https://github.com/future-architect/vuls/pull/79) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
- Fix error handling of gorequest [\#75](https://github.com/future-architect/vuls/pull/75) ([kotakanbe](https://github.com/kotakanbe))
- Fix freezing forever when no args specified in TUI mode [\#73](https://github.com/future-architect/vuls/pull/73) ([kotakanbe](https://github.com/kotakanbe))
- mv version.go version/version.go to run main.go without compile [\#71](https://github.com/future-architect/vuls/pull/71) ([sadayuki-matsuno](https://github.com/sadayuki-matsuno))
**Closed issues:**
- SSh password authentication failed on FreeBSD [\#99](https://github.com/future-architect/vuls/issues/99)
- BUG: -o pipefail is not work on FreeBSD's /bin/sh. because it isn't bash [\#91](https://github.com/future-architect/vuls/issues/91)
- Use ~/.ssh/config [\#62](https://github.com/future-architect/vuls/issues/62)
- SSH ciphers [\#37](https://github.com/future-architect/vuls/issues/37)
**Merged pull requests:**
- Update README \#138 [\#144](https://github.com/future-architect/vuls/pull/144) ([kotakanbe](https://github.com/kotakanbe))
- Fix a typo [\#142](https://github.com/future-architect/vuls/pull/142) ([dtan4](https://github.com/dtan4))
- Remove unnecessary step in readme of docker setup [\#140](https://github.com/future-architect/vuls/pull/140) ([mikkame](https://github.com/mikkame))
- Update logo [\#139](https://github.com/future-architect/vuls/pull/139) ([chanomaru](https://github.com/chanomaru))
- Update README.ja.md to fix wrong tips. [\#135](https://github.com/future-architect/vuls/pull/135) ([a2atsu](https://github.com/a2atsu))
- add tips about NVD JVN issue [\#133](https://github.com/future-architect/vuls/pull/133) ([a2atsu](https://github.com/a2atsu))
- Fix README wrong links [\#129](https://github.com/future-architect/vuls/pull/129) ([aomoriringo](https://github.com/aomoriringo))
- Add logo [\#126](https://github.com/future-architect/vuls/pull/126) ([chanomaru](https://github.com/chanomaru))
- Improve setup/docker [\#125](https://github.com/future-architect/vuls/pull/125) ([kotakanbe](https://github.com/kotakanbe))
- Fix scan command help [\#124](https://github.com/future-architect/vuls/pull/124) ([aomoriringo](https://github.com/aomoriringo))
- added dockernized-vuls with vulsrepo [\#121](https://github.com/future-architect/vuls/pull/121) ([hikachan](https://github.com/hikachan))
- Fix detect platform on azure and degital ocean [\#119](https://github.com/future-architect/vuls/pull/119) ([kotakanbe](https://github.com/kotakanbe))
- Remove json marshall-indent [\#118](https://github.com/future-architect/vuls/pull/118) ([kotakanbe](https://github.com/kotakanbe))
- Improve Readme.ja [\#116](https://github.com/future-architect/vuls/pull/116) ([kotakanbe](https://github.com/kotakanbe))
- Add architecture diag to README.md [\#114](https://github.com/future-architect/vuls/pull/114) ([kotakanbe](https://github.com/kotakanbe))
- Rename linux.go to base.go [\#100](https://github.com/future-architect/vuls/pull/100) ([kotakanbe](https://github.com/kotakanbe))
- Update README.md [\#74](https://github.com/future-architect/vuls/pull/74) ([yoshi-taka](https://github.com/yoshi-taka))
- Refactoring debian.go [\#72](https://github.com/future-architect/vuls/pull/72) ([kotakanbe](https://github.com/kotakanbe))
## [v0.1.4](https://github.com/future-architect/vuls/tree/v0.1.4) (2016-05-24)
[Full Changelog](https://github.com/future-architect/vuls/compare/v0.1.3...v0.1.4)
**Implemented enhancements:**
- Initial fetch from NVD is too heavy \(2.3 GB of memory consumed\) [\#27](https://github.com/future-architect/vuls/issues/27)
- Enable to show previous scan result [\#69](https://github.com/future-architect/vuls/pull/69) ([kotakanbe](https://github.com/kotakanbe))
- Add ignore-unscored-cves option [\#68](https://github.com/future-architect/vuls/pull/68) ([kotakanbe](https://github.com/kotakanbe))
- Support dynamic scanning docker container [\#67](https://github.com/future-architect/vuls/pull/67) ([kotakanbe](https://github.com/kotakanbe))
- Add version flag [\#65](https://github.com/future-architect/vuls/pull/65) ([kotakanbe](https://github.com/kotakanbe))
- Update Dockerfile [\#57](https://github.com/future-architect/vuls/pull/57) ([theonlydoo](https://github.com/theonlydoo))
- Update run.sh [\#56](https://github.com/future-architect/vuls/pull/56) ([theonlydoo](https://github.com/theonlydoo))
- Support Windows [\#33](https://github.com/future-architect/vuls/pull/33) ([mattn](https://github.com/mattn))
**Fixed bugs:**
- vuls scan -cvss-over does not work. [\#59](https://github.com/future-architect/vuls/issues/59)
- `panic: runtime error: invalid memory address or nil pointer dereference` when scan CentOS5.5 [\#58](https://github.com/future-architect/vuls/issues/58)
- It rans out of memory. [\#47](https://github.com/future-architect/vuls/issues/47)
- BUG: vuls scan on CentOS with Japanese environment. [\#43](https://github.com/future-architect/vuls/issues/43)
- yum --color=never [\#36](https://github.com/future-architect/vuls/issues/36)
- Failed to parse yum check-update [\#32](https://github.com/future-architect/vuls/issues/32)
- Pointless sudo [\#29](https://github.com/future-architect/vuls/issues/29)
- Can't init database in a path having blanks [\#26](https://github.com/future-architect/vuls/issues/26)
- Fix pointless sudo in debian.go \#29 [\#66](https://github.com/future-architect/vuls/pull/66) ([kotakanbe](https://github.com/kotakanbe))
- Fix error handling of httpGet in cve-client \#58 [\#64](https://github.com/future-architect/vuls/pull/64) ([kotakanbe](https://github.com/kotakanbe))
- Fix nil pointer at error handling of cve\_client \#58 [\#63](https://github.com/future-architect/vuls/pull/63) ([kotakanbe](https://github.com/kotakanbe))
- Set language en\_US. [\#61](https://github.com/future-architect/vuls/pull/61) ([pabroff](https://github.com/pabroff))
- Fix -cvss-over flag \#59 [\#60](https://github.com/future-architect/vuls/pull/60) ([kotakanbe](https://github.com/kotakanbe))
- Fix scan on Japanese environment. [\#55](https://github.com/future-architect/vuls/pull/55) ([pabroff](https://github.com/pabroff))
- Fix a typo: replace Depricated by Deprecated. [\#54](https://github.com/future-architect/vuls/pull/54) ([jody-frankowski](https://github.com/jody-frankowski))
- Fix yes no infinite loop while doing yum update --changelog on root@CentOS \#47 [\#50](https://github.com/future-architect/vuls/pull/50) ([pabroff](https://github.com/pabroff))
- Fix $servername in output of discover command [\#45](https://github.com/future-architect/vuls/pull/45) ([kotakanbe](https://github.com/kotakanbe))
## [v0.1.3](https://github.com/future-architect/vuls/tree/v0.1.3) (2016-04-21)
[Full Changelog](https://github.com/future-architect/vuls/compare/v0.1.2...v0.1.3)
**Implemented enhancements:**
- Add sudo support for prepare [\#11](https://github.com/future-architect/vuls/issues/11)
- Dockerfile? [\#10](https://github.com/future-architect/vuls/issues/10)
- Update README [\#41](https://github.com/future-architect/vuls/pull/41) ([theonlydoo](https://github.com/theonlydoo))
- Sparse dockerization [\#38](https://github.com/future-architect/vuls/pull/38) ([theonlydoo](https://github.com/theonlydoo))
- No password in config [\#35](https://github.com/future-architect/vuls/pull/35) ([kotakanbe](https://github.com/kotakanbe))
- Fr readme translation [\#23](https://github.com/future-architect/vuls/pull/23) ([novakin](https://github.com/novakin))
**Fixed bugs:**
- Issues updating CVE database behind https proxy [\#39](https://github.com/future-architect/vuls/issues/39)
- Vuls failed to parse yum check-update [\#24](https://github.com/future-architect/vuls/issues/24)
- Fix yum to yum --color=never \#36 [\#42](https://github.com/future-architect/vuls/pull/42) ([kotakanbe](https://github.com/kotakanbe))
- Fix parse yum check update [\#40](https://github.com/future-architect/vuls/pull/40) ([kotakanbe](https://github.com/kotakanbe))
- fix typo [\#31](https://github.com/future-architect/vuls/pull/31) ([blue119](https://github.com/blue119))
- Fix error while parsing yum check-update \#24 [\#30](https://github.com/future-architect/vuls/pull/30) ([kotakanbe](https://github.com/kotakanbe))
**Closed issues:**
- Unable to scan on ubuntu because changelog.ubuntu.com is down... [\#21](https://github.com/future-architect/vuls/issues/21)
- err: Not initialize\(d\) yet.. [\#16](https://github.com/future-architect/vuls/issues/16)
- Errors when using fish shell [\#8](https://github.com/future-architect/vuls/issues/8)
## [v0.1.2](https://github.com/future-architect/vuls/tree/v0.1.2) (2016-04-12)
[Full Changelog](https://github.com/future-architect/vuls/compare/v0.1.1...v0.1.2)
**Fixed bugs:**
- Maximum 6 nodes available to scan [\#12](https://github.com/future-architect/vuls/issues/12)
- panic: runtime error: index out of range [\#5](https://github.com/future-architect/vuls/issues/5)
- Fix sudo option on RedHat like Linux and change some messages. [\#20](https://github.com/future-architect/vuls/pull/20) ([kotakanbe](https://github.com/kotakanbe))
- Typo fix and updated readme [\#19](https://github.com/future-architect/vuls/pull/19) ([EuanKerr](https://github.com/EuanKerr))
- remove a period at the end of error messages. [\#18](https://github.com/future-architect/vuls/pull/18) ([kotakanbe](https://github.com/kotakanbe))
- fix error while yum updateinfo --security update on rhel@aws [\#17](https://github.com/future-architect/vuls/pull/17) ([kotakanbe](https://github.com/kotakanbe))
- Fixed typos [\#15](https://github.com/future-architect/vuls/pull/15) ([radarhere](https://github.com/radarhere))
- Typo fix in error messages [\#14](https://github.com/future-architect/vuls/pull/14) ([Bregor](https://github.com/Bregor))
- Fix index out of range error when the number of servers is over 6. \#12 [\#13](https://github.com/future-architect/vuls/pull/13) ([kotakanbe](https://github.com/kotakanbe))
- Revise small grammar mistakes in serverapi.go [\#9](https://github.com/future-architect/vuls/pull/9) ([cpobrien](https://github.com/cpobrien))
- Fix error handling in HTTP backoff function [\#7](https://github.com/future-architect/vuls/pull/7) ([kotakanbe](https://github.com/kotakanbe))
## [v0.1.1](https://github.com/future-architect/vuls/tree/v0.1.1) (2016-04-06)
[Full Changelog](https://github.com/future-architect/vuls/compare/v0.1.0...v0.1.1)
**Fixed bugs:**
- Typo in Exapmle [\#6](https://github.com/future-architect/vuls/pull/6) ([toli](https://github.com/toli))
## [v0.1.0](https://github.com/future-architect/vuls/tree/v0.1.0) (2016-04-04)
**Merged pull requests:**
- English translation [\#4](https://github.com/future-architect/vuls/pull/4) ([hikachan](https://github.com/hikachan))
- English translation [\#3](https://github.com/future-architect/vuls/pull/3) ([chewyinping](https://github.com/chewyinping))
- Add a Bitdeli Badge to README [\#2](https://github.com/future-architect/vuls/pull/2) ([bitdeli-chef](https://github.com/bitdeli-chef))
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
================================================
FILE: Dockerfile
================================================
FROM golang:alpine@sha256:d4c4845f5d60c6a974c6000ce58ae079328d03ab7f721a0734277e69905473e5 as builder
RUN apk add --no-cache \
git \
make \
gcc \
musl-dev
ENV REPOSITORY github.com/future-architect/vuls
COPY . $GOPATH/src/$REPOSITORY
RUN cd $GOPATH/src/$REPOSITORY && make install
FROM alpine:3.22@sha256:55ae5d250caebc548793f321534bc6a8ef1d116f334f18f4ada1b2daad3251b2
ENV LOGDIR /var/log/vuls
ENV WORKDIR /vuls
RUN apk add --no-cache \
openssh-client \
ca-certificates \
git \
nmap \
&& mkdir -p $WORKDIR $LOGDIR
COPY --from=builder /go/bin/vuls /usr/local/bin/
VOLUME ["$WORKDIR", "$LOGDIR"]
WORKDIR $WORKDIR
ENV PWD $WORKDIR
ENTRYPOINT ["vuls"]
CMD ["--help"]
================================================
FILE: GNUmakefile
================================================
.PHONY: \
build \
install \
all \
vendor \
lint \
vet \
fmt \
fmtcheck \
pretest \
test \
cov \
clean
SRCS = $(shell git ls-files '*.go')
PKGS = $(shell go list ./...)
VERSION := $(shell git describe --tags --abbrev=0)
REVISION := $(shell git rev-parse --short HEAD)
BUILDTIME := $(shell date "+%Y%m%d_%H%M%S")
LDFLAGS := -X 'github.com/future-architect/vuls/config.Version=$(VERSION)' -X 'github.com/future-architect/vuls/config.Revision=build-$(BUILDTIME)_$(REVISION)'
GO := CGO_ENABLED=0 GOEXPERIMENT=jsonv2 go
GO_WINDOWS := GOOS=windows GOARCH=amd64 $(GO)
all: build test
build: ./cmd/vuls/main.go
$(GO) build -a -trimpath -ldflags "$(LDFLAGS)" -o vuls ./cmd/vuls
build-windows: ./cmd/vuls/main.go
$(GO_WINDOWS) build -a -trimpath -ldflags " $(LDFLAGS)" -o vuls.exe ./cmd/vuls
install: ./cmd/vuls/main.go
$(GO) install -a -trimpath -ldflags "$(LDFLAGS)" ./cmd/vuls
build-scanner: ./cmd/scanner/main.go
$(GO) build -tags=scanner -a -trimpath -ldflags "$(LDFLAGS)" -o vuls ./cmd/scanner
build-scanner-windows: ./cmd/scanner/main.go
$(GO_WINDOWS) build -tags=scanner -a -trimpath -ldflags " $(LDFLAGS)" -o vuls.exe ./cmd/scanner
install-scanner: ./cmd/scanner/main.go
$(GO) install -a -trimpath -tags=scanner -ldflags "$(LDFLAGS)" ./cmd/scanner
lint:
go install github.com/mgechev/revive@latest
revive -config ./.revive.toml -formatter plain $(PKGS)
vet:
echo $(PKGS) | xargs env $(GO) vet || exit;
golangci:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
golangci-lint run
fmt:
gofmt -s -w $(SRCS)
fmtcheck:
$(foreach file,$(SRCS),gofmt -s -d $(file);)
pretest: lint vet fmtcheck
test: pretest
$(GO) test -cover -v ./... || exit;
cov:
@ go get -v github.com/axw/gocov/gocov
@ go get golang.org/x/tools/cmd/cover
gocov test -v ./... | gocov report
clean:
echo $(PKGS) | xargs go clean || exit;
# trivy-to-vuls
build-trivy-to-vuls: ./contrib/trivy/cmd/main.go
$(GO) build -a -ldflags "$(LDFLAGS)" -o trivy-to-vuls ./contrib/trivy/cmd
# future-vuls
build-future-vuls: ./contrib/future-vuls/cmd/main.go
$(GO) build -a -ldflags "$(LDFLAGS)" -o future-vuls ./contrib/future-vuls/cmd
# snmp2cpe
build-snmp2cpe: ./contrib/snmp2cpe/cmd/main.go
$(GO) build -a -ldflags "$(LDFLAGS)" -o snmp2cpe ./contrib/snmp2cpe/cmd
# integration-test
BASE_DIR := '${PWD}/integration/results'
CURRENT := `find ${BASE_DIR} -type d -exec basename {} \; | sort -nr | head -n 1`
NOW=$(shell date '+%Y-%m-%dT%H-%M-%S%z')
NOW_JSON_DIR := '${BASE_DIR}/$(NOW)'
ONE_SEC_AFTER=$(shell date -d '+1 second' '+%Y-%m-%dT%H-%M-%S%z')
ONE_SEC_AFTER_JSON_DIR := '${BASE_DIR}/$(ONE_SEC_AFTER)'
LIBS := 'bundler' 'dart' 'elixir' 'pip' 'pipenv' 'poetry-v1' 'poetry-v2' 'uv' 'composer' 'npm-v1' 'npm-v2' 'npm-v3' 'yarn' 'pnpm' 'pnpm-v9' 'bun' 'cargo' 'gomod' 'gosum' 'gobinary' 'jar' 'jar-wrong-name-log4j-core' 'war' 'pom' 'gradle' 'nuget-lock' 'nuget-config' 'dotnet-deps' 'dotnet-package-props' 'conan-v1' 'conan-v2' 'swift-cocoapods' 'swift-swift' 'rust-binary'
diff:
# git clone git@github.com:vulsio/vulsctl.git
# cd vulsctl/docker
# ./update-all.sh
# cd /path/to/vuls
# vim integration/int-config.toml
# ln -s vuls vuls.new
# ln -s oldvuls vuls.old
# make int
# (ex. test 10 times: for i in `seq 10`; do make int ARGS=-quiet ; done)
ifneq ($(shell ls -U1 ${BASE_DIR} | wc -l), 0)
mv ${BASE_DIR} /tmp/${NOW}
endif
mkdir -p ${NOW_JSON_DIR}
sleep 1
./vuls.old scan -config=./integration/int-config.toml --results-dir=${BASE_DIR} ${LIBS}
cp ${BASE_DIR}/$(CURRENT)/*.json ${NOW_JSON_DIR}
- cp integration/data/results/*.json ${NOW_JSON_DIR}
./vuls.old report --format-json --refresh-cve --results-dir=${BASE_DIR} -config=./integration/int-config.toml ${NOW}
mkdir -p ${ONE_SEC_AFTER_JSON_DIR}
sleep 1
./vuls.new scan -config=./integration/int-config.toml --results-dir=${BASE_DIR} ${LIBS}
cp ${BASE_DIR}/$(CURRENT)/*.json ${ONE_SEC_AFTER_JSON_DIR}
- cp integration/data/results/*.json ${ONE_SEC_AFTER_JSON_DIR}
./vuls.new report --format-json --refresh-cve --results-dir=${BASE_DIR} -config=./integration/int-config.toml ${ONE_SEC_AFTER}
$(call sed-d)
- diff -c ${NOW_JSON_DIR} ${ONE_SEC_AFTER_JSON_DIR}
echo "old: ${NOW_JSON_DIR} , new: ${ONE_SEC_AFTER_JSON_DIR}"
$(call count-cve)
diff-redis:
# docker network create redis-nw
# docker run --name redis -d --network redis-nw -p 127.0.0.1:6379:6379 redis
# git clone git@github.com:vulsio/vulsctl.git
# cd vulsctl/docker
# ./update-all-redis.sh
# (or export DOCKER_NETWORK=redis-nw; cd /home/ubuntu/vulsctl/docker; ./update-all.sh --dbtype redis --dbpath "redis://redis/0")
# vim integration/int-redis-config.toml
# ln -s vuls vuls.new
# ln -s oldvuls vuls.old
# make int-redis
ifneq ($(shell ls -U1 ${BASE_DIR} | wc -l), 0)
mv ${BASE_DIR} /tmp/${NOW}
endif
mkdir -p ${NOW_JSON_DIR}
sleep 1
./vuls.old scan -config=./integration/int-config.toml --results-dir=${BASE_DIR} ${LIBS}
cp -f ${BASE_DIR}/$(CURRENT)/*.json ${NOW_JSON_DIR}
- cp integration/data/results/*.json ${NOW_JSON_DIR}
./vuls.old report --format-json --refresh-cve --results-dir=${BASE_DIR} -config=./integration/int-redis-config.toml ${NOW}
mkdir -p ${ONE_SEC_AFTER_JSON_DIR}
sleep 1
./vuls.new scan -config=./integration/int-config.toml --results-dir=${BASE_DIR} ${LIBS}
cp -f ${BASE_DIR}/$(CURRENT)/*.json ${ONE_SEC_AFTER_JSON_DIR}
- cp integration/data/results/*.json ${ONE_SEC_AFTER_JSON_DIR}
./vuls.new report --format-json --refresh-cve --results-dir=${BASE_DIR} -config=./integration/int-redis-config.toml ${ONE_SEC_AFTER}
$(call sed-d)
- diff -c ${NOW_JSON_DIR} ${ONE_SEC_AFTER_JSON_DIR}
echo "old: ${NOW_JSON_DIR} , new: ${ONE_SEC_AFTER_JSON_DIR}"
$(call count-cve)
diff-rdb-redis:
ifneq ($(shell ls -U1 ${BASE_DIR} | wc -l), 0)
mv ${BASE_DIR} /tmp/${NOW}
endif
mkdir -p ${NOW_JSON_DIR}
sleep 1
# new vs new
./vuls.new scan -config=./integration/int-config.toml --results-dir=${BASE_DIR} ${LIBS}
cp -f ${BASE_DIR}/$(CURRENT)/*.json ${NOW_JSON_DIR}
cp integration/data/results/*.json ${NOW_JSON_DIR}
./vuls.new report --format-json --refresh-cve --results-dir=${BASE_DIR} -config=./integration/int-config.toml ${NOW}
mkdir -p ${ONE_SEC_AFTER_JSON_DIR}
sleep 1
./vuls.new scan -config=./integration/int-config.toml --results-dir=${BASE_DIR} ${LIBS}
cp -f ${BASE_DIR}/$(CURRENT)/*.json ${ONE_SEC_AFTER_JSON_DIR}
cp integration/data/results/*.json ${ONE_SEC_AFTER_JSON_DIR}
./vuls.new report --format-json --refresh-cve --results-dir=${BASE_DIR} -config=./integration/int-redis-config.toml ${ONE_SEC_AFTER}
$(call sed-d)
- diff -c ${NOW_JSON_DIR} ${ONE_SEC_AFTER_JSON_DIR}
echo "old: ${NOW_JSON_DIR} , new: ${ONE_SEC_AFTER_JSON_DIR}"
$(call count-cve)
head= $(shell git rev-parse HEAD)
prev= $(shell git rev-parse HEAD^)
branch=$(shell git rev-parse --abbrev-ref HEAD)
build-integration:
git stash
# buld HEAD
git checkout ${head}
make build
mv -f ./vuls ./vuls.${head}
# HEAD^
git checkout ${prev}
make build
mv -f ./vuls ./vuls.${prev}
# master
git checkout master
make build
mv -f ./vuls ./vuls.master
# working tree
git checkout ${branch}
git stash apply stash@\{0\}
make build
# update integration data
git submodule update --remote
# for integration testing, vuls.new and vuls.old needed.
# ex)
# $ ln -s ./vuls ./vuls.new
# $ ln -s ./vuls.${head} ./vuls.old
# or
# $ ln -s ./vuls.${prev} ./vuls.old
# then
# $ make diff
# $ make diff-redis
# $ make diff-rdb-redis
define sed-d
find ${NOW_JSON_DIR} -type f -exec sed -i -e '/scannedAt/d' {} \;
find ${ONE_SEC_AFTER_JSON_DIR} -type f -exec sed -i -e '/scannedAt/d' {} \;
find ${NOW_JSON_DIR} -type f -exec sed -i -e '/reportedAt/d' {} \;
find ${ONE_SEC_AFTER_JSON_DIR} -type f -exec sed -i -e '/reportedAt/d' {} \;
find ${NOW_JSON_DIR} -type f -exec sed -i -e '/"Type":/d' {} \;
find ${ONE_SEC_AFTER_JSON_DIR} -type f -exec sed -i -e '/"Type":/d' {} \;
find ${NOW_JSON_DIR} -type f -exec sed -i -e '/"SQLite3Path":/d' {} \;
find ${ONE_SEC_AFTER_JSON_DIR} -type f -exec sed -i -e '/"SQLite3Path":/d' {} \;
find ${NOW_JSON_DIR} -type f -exec sed -i -e '/reportedVersion/d' {} \;
find ${ONE_SEC_AFTER_JSON_DIR} -type f -exec sed -i -e '/reportedVersion/d' {} \;
find ${NOW_JSON_DIR} -type f -exec sed -i -e '/reportedRevision/d' {} \;
find ${ONE_SEC_AFTER_JSON_DIR} -type f -exec sed -i -e '/reportedRevision/d' {} \;
find ${NOW_JSON_DIR} -type f -exec sed -i -e '/scannedVersion/d' {} \;
find ${ONE_SEC_AFTER_JSON_DIR} -type f -exec sed -i -e '/scannedVersion/d' {} \;
find ${NOW_JSON_DIR} -type f -exec sed -i -e '/scannedRevision/d' {} \;
find ${ONE_SEC_AFTER_JSON_DIR} -type f -exec sed -i -e '/scannedRevision/d' {} \;
endef
define count-cve
for jsonfile in ${NOW_JSON_DIR}/*.json ; do \
echo $$jsonfile; cat $$jsonfile | jq ".scannedCves | length" ; \
done
for jsonfile in ${ONE_SEC_AFTER_JSON_DIR}/*.json ; do \
echo $$jsonfile; cat $$jsonfile | jq ".scannedCves | length" ; \
done
endef
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Vuls - Vulnerability Scanner
Copyright (C) 2016 Future Corporation , Japan.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Vuls Copyright (C) 2016 Future Corporation , Japan.
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
================================================
FILE: README.md
================================================
# Vuls: VULnerability Scanner
[](http://goo.gl/forms/xm5KFo35tu)
[](https://github.com/future-architect/vuls/blob/master/LICENSE)
[](https://goreportcard.com/report/github.com/future-architect/vuls)
[](https://github.com/future-architect/vuls/graphs/contributors)

Vulnerability scanner for Linux/FreeBSD, agent-less, written in Go.
We have a slack team. [Join slack team](https://join.slack.com/t/vuls-github/shared_invite/zt-1fculjwj4-6nex2JNE7DpOSiKZ1ztDFw)
Twitter: [@vuls_en](https://twitter.com/vuls_en)


[](https://asciinema.org/a/3y9zrf950agiko7klg8abvyck)

----
## Abstract
For a system administrator, having to perform security vulnerability analysis and software update on a daily basis can be a burden.
To avoid downtime in a production environment, it is common for a system administrator to choose not to use the automatic update option provided by the package manager and to perform update manually.
This leads to the following problems.
- The system administrator will have to constantly watch out for any new vulnerabilities in NVD (National Vulnerability Database) or similar databases.
- It might be impossible for the system administrator to monitor all the software if there are a large number of software packages installed in the server.
- It is expensive to perform analysis to determine the servers affected by new vulnerabilities. The possibility of overlooking a server or two during analysis is there.
Vuls is a tool created to solve the problems listed above. It has the following characteristics.
- Informs users of the vulnerabilities that are related to the system.
- Informs users of the servers that are affected.
- Vulnerability detection is done automatically to prevent any oversight.
- A report is generated on a regular basis using CRON or other methods. to manage vulnerability.

----
## Main Features
### Scan for any vulnerabilities in Linux/FreeBSD/Windows/macOS
[Supports major Linux/FreeBSD/Windows/macOS](https://vuls.io/docs/en/supported-os.html)
- Alpine, Amazon Linux, CentOS, AlmaLinux, Rocky Linux, Debian, Oracle Linux, Raspbian, RHEL, openSUSE, openSUSE Leap, SUSE Enterprise Linux, Fedora, and Ubuntu
- FreeBSD
- Windows
- macOS
- Cloud, on-premise, Running Docker Container
### High-quality scan
- Vulnerability Database
- [NVD](https://nvd.nist.gov/)
- [JVN(Japanese)](http://jvndb.jvn.jp/apis/myjvn/)
- OVAL
- [Red Hat](https://www.redhat.com/security/data/oval/)
- [Debian](https://www.debian.org/security/oval/)
- [Ubuntu](https://security-metadata.canonical.com/oval/)
- [SUSE](http://ftp.suse.com/pub/projects/security/oval/)
- [Oracle Linux](https://linux.oracle.com/security/oval/)
- Security Advisory
- [Alpine-secdb](https://git.alpinelinux.org/cgit/alpine-secdb/)
- [Red Hat Security Advisories](https://access.redhat.com/security/security-updates/)
- [Debian Security Bug Tracker](https://security-tracker.debian.org/tracker/)
- [Ubuntu CVE Tracker](https://people.canonical.com/~ubuntu-security/cve/)
- [Microsoft CVRF](https://api.msrc.microsoft.com/cvrf/v2.0/swagger/index)
- Commands(yum, zypper, pkg-audit)
- RHSA / ALAS / ELSA / FreeBSD-SA
- Changelog
- PoC, Exploit
- [Exploit Database](https://www.exploit-db.com/)
- [Metasploit-Framework modules](https://www.rapid7.com/db/?q=&type=metasploit)
- [qazbnm456/awesome-cve-poc](https://github.com/qazbnm456/awesome-cve-poc)
- [nomi-sec/PoC-in-GitHub](https://github.com/nomi-sec/PoC-in-GitHub)
- [gmatuz/inthewilddb](https://github.com/gmatuz/inthewilddb)
- [projectdiscovery/nuclei-templates](https://github.com/projectdiscovery/nuclei-templates)
- CERT
- [US-CERT](https://www.us-cert.gov/ncas/alerts)
- [JPCERT](http://www.jpcert.or.jp/at/2019.html)
- KEV
- CISA(Cybersecurity & Infrastructure Security Agency): [Known Exploited Vulnerabilities Catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog)
- VulnCheck: [VulnCheck KEV](https://vulncheck.com/kev)
- Cyber Threat Intelligence(MITRE ATT&CK and CAPEC)
- [mitre/cti](https://github.com/mitre/cti)
- Libraries
- [aquasecurity/vuln-list](https://github.com/aquasecurity/vuln-list)
- WordPress
- [wpscan](https://wpscan.com/api)
### Scan mode
[Fast Scan](https://vuls.io/docs/en/architecture-fast-scan.html)
- Scan without root privilege, no dependencies
- Almost no load on the scan target server
- Offline mode scan with no internet access. (CentOS, Alma Linux, Rocky Linux, Debian, Oracle Linux, Red Hat, Fedora, and Ubuntu)
[Fast Root Scan](https://vuls.io/docs/en/architecture-fast-root-scan.html)
- Scan with root privilege
- Almost no load on the scan target server
- Detect processes affected by update using yum-ps (Amazon Linux, CentOS, Alma Linux, Rocky Linux, Oracle Linux, Fedora, and RedHat)
- Detect processes which updated before but not restarting yet using checkrestart of debian-goodies (Debian and Ubuntu)
- Offline mode scan with no internet access. (CentOS, Alma Linux, Rocky Linux, Debian, Oracle Linux, Red Hat, Fedora, and Ubuntu)
### [Remote, Local scan mode, Server mode](https://vuls.io/docs/en/architecture-remote-local.html)
[Remote scan mode](https://vuls.io/docs/en/architecture-remote-scan.html)
- User is required to only set up one machine that is connected to other target servers via SSH
[Local scan mode](https://vuls.io/docs/en/architecture-local-scan.html)
- If you don't want the central Vuls server to connect to each server by SSH, you can use Vuls in the Local Scan mode.
[Server mode](https://vuls.io/docs/en/usage-server.html)
- First, start Vuls in server mode and listen as an HTTP server.
- Next, issue a command on the scan target server to collect software information. Then send the result to Vuls Server via HTTP. You receive the scan results as JSON format.
- No SSH needed, No Scanner needed. Only issuing Linux commands directory on the scan target server.
### **Dynamic** Analysis
- It is possible to acquire the state of the server by connecting via SSH and executing the command.
- Vuls warns when the scan target server was updated the kernel etc. but not restarting it.
### Scan vulnerabilities of non-OS-packages
- Libraries of programming language
- Self-compiled software
- Network Devices
Vuls has some options to detect the vulnerabilities
- [Lockfile based Scan](https://vuls.io/docs/en/usage-scan-non-os-packages.html#library-vulns-scan)
- [GitHub Integration](https://vuls.io/docs/en/usage-scan-non-os-packages.html#usage-integrate-with-github-security-alerts)
- [Common Platform Enumeration (CPE) based Scan](https://vuls.io/docs/en/usage-scan-non-os-packages.html#cpe-scan)
- [OWASP Dependency Check Integration](https://vuls.io/docs/en/usage-scan-non-os-packages.html#usage-integrate-with-owasp-dependency-check-to-automatic-update-when-the-libraries-are-updated-experimental)
## Scan WordPress core, themes, plugins
- [Scan WordPress](https://vuls.io/docs/en/usage-scan-wordpress.html)
## MISC
- Nondestructive testing
- Pre-authorization is *NOT* necessary before scanning on AWS
- Vuls works well with Continuous Integration since tests can be run every day. This allows you to find vulnerabilities very quickly.
- Auto-generation of configuration file template
- Auto-detection of servers set using CIDR, generate configuration file template
- Email and Slack notification is possible (supports Japanese language)
- Scan result is viewable on accessory software, TUI Viewer in a terminal or Web UI ([VulsRepo](https://github.com/ishiDACo/vulsrepo)).
----
## What Vuls Doesn't Do
- Vuls doesn't update the vulnerable packages.
----
## Document
For more information such as Installation, Tutorial, Usage, visit [vuls.io](https://vuls.io/)
[日本語翻訳ドキュメント](https://vuls.io/ja/)
----
## Authors
kotakanbe ([@kotakanbe](https://twitter.com/kotakanbe)) created vuls and [these fine people](https://github.com/future-architect/vuls/graphs/contributors) have contributed.
## Contribute
see [vulsdoc](https://vuls.io/docs/en/how-to-contribute.html)
----
## Sponsors
| | |
| ------------- | ------------- |
| <a href="https://www.tines.com/?utm_source=oss&utm_medium=sponsorship&utm_campaign=vuls"><img src="img/sponsor/tines.png" align="left" width="600px" ></a> | Tines is no-code automation for security teams. Build powerful, reliable workflows without a development team. |
| <a href="https://www.sakura.ad.jp/"><img src="https://vuls.io/img/icons/sakura.svg" align="left" width="600px" ></a> | SAKURA internet Inc. is an Internet company founded in 1996. We provide cloud computing services such as "Sakura's Shared Server", "Sakura's VPS", and "Sakura's Cloud" to meet the needs of a wide range of customers, from individuals and corporations to the education and public sectors, using its own data centers in Japan. Based on the philosophy of "changing what you want to do into what you can do," we offer DX solutions for all fields. |
----
## License
Please see [LICENSE](https://github.com/future-architect/vuls/blob/master/LICENSE).
================================================
FILE: SECURITY.md
================================================
# Security Policy
## Supported Versions
Only the latest version is supported.
## Reporting a Vulnerability
Email kotakanbe@gmail.com
================================================
FILE: cache/bolt.go
================================================
package cache
import (
"encoding/json"
"time"
bolt "go.etcd.io/bbolt"
"golang.org/x/xerrors"
"github.com/future-architect/vuls/logging"
"github.com/future-architect/vuls/util"
)
// Bolt holds a pointer of bolt.DB
// boltdb is used to store a cache of Changelogs of Ubuntu/Debian
type Bolt struct {
Path string
Log logging.Logger
db *bolt.DB
}
// SetupBolt opens a boltdb and creates a meta bucket if not exists.
func SetupBolt(path string, l logging.Logger) error {
l.Infof("Open boltDB: %s", path)
db, err := bolt.Open(path, 0600, nil)
if err != nil {
return err
}
b := Bolt{
Path: path,
Log: l,
db: db,
}
if err = b.createBucketIfNotExists(metabucket); err != nil {
return err
}
DB = b
return nil
}
// Close a db.
func (b Bolt) Close() error {
if b.db == nil {
return nil
}
return b.db.Close()
}
// CreateBucketIfNotExists creates a bucket that is specified by arg.
func (b *Bolt) createBucketIfNotExists(name string) error {
return b.db.Update(func(tx *bolt.Tx) error {
_, err := tx.CreateBucketIfNotExists([]byte(name))
if err != nil {
return xerrors.Errorf("Failed to create bucket: %w", err)
}
return nil
})
}
// GetMeta gets a Meta Information os the servername to boltdb.
func (b Bolt) GetMeta(serverName string) (meta Meta, found bool, err error) {
err = b.db.View(func(tx *bolt.Tx) error {
bkt := tx.Bucket([]byte(metabucket))
v := bkt.Get([]byte(serverName))
if len(v) == 0 {
found = false
return nil
}
if e := json.Unmarshal(v, &meta); e != nil {
return e
}
found = true
return nil
})
return
}
// RefreshMeta gets a Meta Information os the servername to boltdb.
func (b Bolt) RefreshMeta(meta Meta) error {
meta.CreatedAt = time.Now()
jsonBytes, err := json.Marshal(meta)
if err != nil {
return xerrors.Errorf("Failed to marshal to JSON: %w", err)
}
return b.db.Update(func(tx *bolt.Tx) error {
bkt := tx.Bucket([]byte(metabucket))
if err := bkt.Put([]byte(meta.Name), jsonBytes); err != nil {
return err
}
b.Log.Debugf("Refreshed Meta: %s", meta.Name)
return nil
})
}
// EnsureBuckets puts a Meta information and create a bucket that holds changelogs.
func (b Bolt) EnsureBuckets(meta Meta) error {
jsonBytes, err := json.Marshal(meta)
if err != nil {
return xerrors.Errorf("Failed to marshal to JSON: %w", err)
}
return b.db.Update(func(tx *bolt.Tx) error {
b.Log.Debugf("Put to meta: %s", meta.Name)
bkt := tx.Bucket([]byte(metabucket))
if err := bkt.Put([]byte(meta.Name), jsonBytes); err != nil {
return err
}
// re-create a bucket (bucket name: servername)
bkt = tx.Bucket([]byte(meta.Name))
if bkt != nil {
b.Log.Debugf("Delete bucket: %s", meta.Name)
if err := tx.DeleteBucket([]byte(meta.Name)); err != nil {
return err
}
b.Log.Debugf("Bucket deleted: %s", meta.Name)
}
b.Log.Debugf("Create bucket: %s", meta.Name)
if _, err := tx.CreateBucket([]byte(meta.Name)); err != nil {
return err
}
b.Log.Debugf("Bucket created: %s", meta.Name)
return nil
})
}
// PrettyPrint is for debug
func (b Bolt) PrettyPrint(meta Meta) error {
return b.db.View(func(tx *bolt.Tx) error {
bkt := tx.Bucket([]byte(metabucket))
v := bkt.Get([]byte(meta.Name))
b.Log.Debugf("Meta: key:%s, value:%s", meta.Name, v)
bkt = tx.Bucket([]byte(meta.Name))
c := bkt.Cursor()
for k, v := c.First(); k != nil; k, v = c.Next() {
b.Log.Debugf("key:%s, len: %d, %s...",
k, len(v), util.Truncate(string(v), 30))
}
return nil
})
}
// GetChangelog get the changelog of specified packName from the Bucket
func (b Bolt) GetChangelog(servername, packName string) (changelog string, err error) {
err = b.db.View(func(tx *bolt.Tx) error {
bkt := tx.Bucket([]byte(servername))
if bkt == nil {
return xerrors.Errorf("Failed to get Bucket: %s", servername)
}
v := bkt.Get([]byte(packName))
if v == nil {
changelog = ""
return nil
}
changelog = string(v)
return nil
})
return
}
// PutChangelog put the changelog of specified packName into the Bucket
func (b Bolt) PutChangelog(servername, packName, changelog string) error {
return b.db.Update(func(tx *bolt.Tx) error {
bkt := tx.Bucket([]byte(servername))
if bkt == nil {
return xerrors.Errorf("Failed to get Bucket: %s", servername)
}
return bkt.Put([]byte(packName), []byte(changelog))
})
}
================================================
FILE: cache/bolt_test.go
================================================
package cache
import (
"os"
"reflect"
"testing"
bolt "go.etcd.io/bbolt"
"github.com/future-architect/vuls/config"
"github.com/future-architect/vuls/logging"
"github.com/future-architect/vuls/models"
)
const path = "/tmp/vuls-test-cache-11111111.db"
const servername = "server1"
var meta = Meta{
Name: servername,
Distro: config.Distro{
Family: "ubuntu",
Release: "16.04",
},
Packs: models.Packages{
"apt": {
Name: "apt",
Version: "1",
},
},
}
func TestSetupBolt(t *testing.T) {
log := logging.NewNormalLogger()
err := SetupBolt(path, log)
if err != nil {
t.Errorf("Failed to setup bolt: %s", err)
}
defer os.Remove(path)
if err := DB.Close(); err != nil {
t.Errorf("Failed to close bolt: %s", err)
}
// check if meta bucket exists
db, err := bolt.Open(path, 0600, nil)
if err != nil {
t.Errorf("Failed to open bolt: %s", err)
}
_ = db.View(func(tx *bolt.Tx) error {
bkt := tx.Bucket([]byte(metabucket))
if bkt == nil {
t.Errorf("Meta bucket nof found")
}
return nil
})
}
func TestEnsureBuckets(t *testing.T) {
log := logging.NewNormalLogger()
if err := SetupBolt(path, log); err != nil {
t.Errorf("Failed to setup bolt: %s", err)
}
if err := DB.EnsureBuckets(meta); err != nil {
t.Errorf("Failed to ensure buckets: %s", err)
}
defer os.Remove(path)
m, found, err := DB.GetMeta(servername)
if err != nil {
t.Errorf("Failed to get meta: %s", err)
}
if !found {
t.Errorf("Not Found in meta")
}
if meta.Name != m.Name || meta.Distro != m.Distro {
t.Errorf("expected %v, actual %v", meta, m)
}
if !reflect.DeepEqual(meta.Packs, m.Packs) {
t.Errorf("expected %v, actual %v", meta.Packs, m.Packs)
}
if err := DB.Close(); err != nil {
t.Errorf("Failed to close bolt: %s", err)
}
db, err := bolt.Open(path, 0600, nil)
if err != nil {
t.Errorf("Failed to open bolt: %s", err)
}
_ = db.View(func(tx *bolt.Tx) error {
bkt := tx.Bucket([]byte(servername))
if bkt == nil {
t.Errorf("Meta bucket nof found")
}
return nil
})
}
func TestPutGetChangelog(t *testing.T) {
clog := "changelog-text"
log := logging.NewNormalLogger()
if err := SetupBolt(path, log); err != nil {
t.Errorf("Failed to setup bolt: %s", err)
}
defer os.Remove(path)
if err := DB.EnsureBuckets(meta); err != nil {
t.Errorf("Failed to ensure buckets: %s", err)
}
if err := DB.PutChangelog(servername, "apt", clog); err != nil {
t.Errorf("Failed to put changelog: %s", err)
}
if actual, err := DB.GetChangelog(servername, "apt"); err != nil {
t.Errorf("Failed to get changelog: %s", err)
} else {
if actual != clog {
t.Errorf("changelog is not same. e: %s, a: %s", clog, actual)
}
}
}
================================================
FILE: cache/db.go
================================================
package cache
import (
"time"
"github.com/future-architect/vuls/config"
"github.com/future-architect/vuls/models"
)
// DB has a cache instance
var DB Cache
const metabucket = "changelog-meta"
// Cache is a interface of cache
type Cache interface {
Close() error
GetMeta(string) (Meta, bool, error)
RefreshMeta(Meta) error
EnsureBuckets(Meta) error
PrettyPrint(Meta) error
GetChangelog(string, string) (string, error)
PutChangelog(string, string, string) error
}
// Meta holds a server name, distro information of the scanned server and
// package information that was collected at the last scan.
type Meta struct {
Name string
Distro config.Distro
Packs models.Packages
CreatedAt time.Time
}
================================================
FILE: cmd/scanner/main.go
================================================
package main
import (
"flag"
"fmt"
"os"
"context"
"github.com/future-architect/vuls/config"
commands "github.com/future-architect/vuls/subcmds"
"github.com/google/subcommands"
)
func main() {
subcommands.Register(subcommands.HelpCommand(), "")
subcommands.Register(subcommands.FlagsCommand(), "")
subcommands.Register(subcommands.CommandsCommand(), "")
subcommands.Register(&commands.DiscoverCmd{}, "discover")
subcommands.Register(&commands.ScanCmd{}, "scan")
subcommands.Register(&commands.HistoryCmd{}, "history")
subcommands.Register(&commands.ConfigtestCmd{}, "configtest")
subcommands.Register(&commands.SaaSCmd{}, "saas")
var v = flag.Bool("v", false, "Show version")
flag.Parse()
if *v {
fmt.Printf("vuls %s %s\n", config.Version, config.Revision)
os.Exit(int(subcommands.ExitSuccess))
}
ctx := context.Background()
os.Exit(int(subcommands.Execute(ctx)))
}
================================================
FILE: cmd/vuls/main.go
================================================
package main
import (
"flag"
"fmt"
"os"
"context"
"github.com/future-architect/vuls/config"
commands "github.com/future-architect/vuls/subcmds"
"github.com/google/subcommands"
)
func main() {
subcommands.Register(subcommands.HelpCommand(), "")
subcommands.Register(subcommands.FlagsCommand(), "")
subcommands.Register(subcommands.CommandsCommand(), "")
subcommands.Register(&commands.DiscoverCmd{}, "discover")
subcommands.Register(&commands.TuiCmd{}, "tui")
subcommands.Register(&commands.ScanCmd{}, "scan")
subcommands.Register(&commands.HistoryCmd{}, "history")
subcommands.Register(&commands.ReportCmd{}, "report")
subcommands.Register(&commands.ConfigtestCmd{}, "configtest")
subcommands.Register(&commands.ServerCmd{}, "server")
var v = flag.Bool("v", false, "Show version")
flag.Parse()
if *v {
fmt.Printf("vuls-%s-%s\n", config.Version, config.Revision)
os.Exit(int(subcommands.ExitSuccess))
}
ctx := context.Background()
os.Exit(int(subcommands.Execute(ctx)))
}
================================================
FILE: config/awsconf.go
================================================
package config
import (
"fmt"
"slices"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
)
// AWSConf is aws config
type AWSConf struct {
// AWS S3 Endpoint to use
S3Endpoint string `json:"s3Endpoint"`
// AWS region to use
Region string `json:"region"`
// AWS profile to use
Profile string `json:"profile"`
// use credential provider
CredentialProvider CredentialProviderType `json:"credentialProvider"`
// S3 bucket name
S3Bucket string `json:"s3Bucket"`
// /bucket/path/to/results
S3ResultsDir string `json:"s3ResultsDir"`
// The Server-side encryption algorithm used when storing the reports in S3 (e.g., AES256, aws:kms).
S3ServerSideEncryption string `json:"s3ServerSideEncryption"`
// use s3 path style
S3UsePathStyle bool `json:"s3UsePathStyle"`
// report s3 enable
Enabled bool `toml:"-" json:"-"`
}
// CredentialProviderType is credential provider type
type CredentialProviderType string
const (
// CredentialProviderAnonymous is credential provider type: anonymous
CredentialProviderAnonymous CredentialProviderType = "anonymous"
)
// Validate configuration
func (c *AWSConf) Validate() (errs []error) {
if !c.Enabled {
return
}
switch c.CredentialProvider {
case CredentialProviderType(""):
case CredentialProviderAnonymous:
default:
errs = append(errs, fmt.Errorf("CredentialProvider: %s is not supported", c.CredentialProvider))
}
if c.S3Bucket == "" {
errs = append(errs, fmt.Errorf("S3Bucket is empty"))
}
if c.S3ServerSideEncryption != "" {
if !slices.Contains(s3.PutObjectInput{}.ServerSideEncryption.Values(), types.ServerSideEncryption(c.S3ServerSideEncryption)) {
errs = append(errs, fmt.Errorf("S3ServerSideEncryption: %s is not supported server side encryption type", c.S3ServerSideEncryption))
}
}
return
}
================================================
FILE: config/azureconf.go
================================================
package config
import (
"fmt"
"os"
"golang.org/x/xerrors"
)
// AzureConf is azure config
type AzureConf struct {
// Azure storage endpoint
Endpoint string `json:"endpoint"`
// Azure account name to use. AZURE_STORAGE_ACCOUNT environment variable is used if not specified
AccountName string `json:"accountName"`
// Azure account key to use. AZURE_STORAGE_ACCESS_KEY environment variable is used if not specified
AccountKey string `json:"-"`
// Azure storage container name
ContainerName string `json:"containerName"`
Enabled bool `toml:"-" json:"-"`
}
const (
azureAccount = "AZURE_STORAGE_ACCOUNT"
azureKey = "AZURE_STORAGE_ACCESS_KEY"
)
// Validate configuration
func (c *AzureConf) Validate() (errs []error) {
if !c.Enabled {
return
}
// overwrite if env var is not empty
if os.Getenv(azureAccount) != "" {
c.AccountName = os.Getenv(azureAccount)
}
if c.AccountName == "" {
errs = append(errs, xerrors.Errorf("Azure account name is required"))
}
if os.Getenv(azureKey) != "" {
c.AccountKey = os.Getenv(azureKey)
}
if c.AccountKey == "" {
errs = append(errs, xerrors.Errorf("Azure account key is required"))
}
if c.Endpoint == "" {
c.Endpoint = fmt.Sprintf("https://%s.blob.core.windows.net/", c.AccountName)
}
if c.ContainerName == "" {
errs = append(errs, xerrors.Errorf("Azure storage container name is required"))
}
return
}
================================================
FILE: config/chatworkconf.go
================================================
package config
import (
"github.com/asaskevich/govalidator"
"golang.org/x/xerrors"
)
// ChatWorkConf is ChatWork config
type ChatWorkConf struct {
APIToken string `json:"-"`
Room string `json:"-"`
Enabled bool `toml:"-" json:"-"`
}
// Validate validates configuration
func (c *ChatWorkConf) Validate() (errs []error) {
if !c.Enabled {
return
}
if len(c.Room) == 0 {
errs = append(errs, xerrors.New("chatWorkConf.room must not be empty"))
}
if len(c.APIToken) == 0 {
errs = append(errs, xerrors.New("chatWorkConf.ApiToken must not be empty"))
}
_, err := govalidator.ValidateStruct(c)
if err != nil {
errs = append(errs, err)
}
return
}
================================================
FILE: config/color.go
================================================
package config
var (
// Colors has ansi color list
Colors = []string{
"\033[32m", // green
"\033[33m", // yellow
"\033[36m", // cyan
"\033[35m", // magenta
"\033[31m", // red
"\033[34m", // blue
}
// ResetColor is reset color
ResetColor = "\033[0m"
)
================================================
FILE: config/config.go
================================================
package config
import (
"fmt"
"os"
"strconv"
"strings"
"github.com/asaskevich/govalidator"
"golang.org/x/xerrors"
"github.com/future-architect/vuls/config/syslog"
"github.com/future-architect/vuls/constant"
"github.com/future-architect/vuls/logging"
)
// Version of Vuls
var Version = "`make build` or `make install` will show the version"
// Revision of Git
var Revision string
// Conf has Configuration(v2)
var Conf Config
// Config is struct of Configuration
type Config struct {
logging.LogOpts
// scan, report
HTTPProxy string `valid:"url" json:"httpProxy,omitempty"`
ResultsDir string `json:"resultsDir,omitempty"`
Pipe bool `json:"pipe,omitempty"`
Default ServerInfo `json:"default,omitzero"`
Servers map[string]ServerInfo `json:"servers,omitempty"`
ScanOpts
// report
CveDict GoCveDictConf `json:"cveDict,omitzero"`
Gost GostConf `json:"gost,omitzero"`
Exploit ExploitConf `json:"exploit,omitzero"`
Metasploit MetasploitConf `json:"metasploit,omitzero"`
KEVuln KEVulnConf `json:"kevuln,omitzero"`
Cti CtiConf `json:"cti,omitzero"`
Vuls2 Vuls2Conf `json:"vuls2,omitzero"`
Slack SlackConf `json:"-"`
EMail SMTPConf `json:"-"`
HTTP HTTPConf `json:"-"`
Syslog syslog.Conf `json:"-"`
AWS AWSConf `json:"-"`
Azure AzureConf `json:"-"`
ChatWork ChatWorkConf `json:"-"`
GoogleChat GoogleChatConf `json:"-"`
Telegram TelegramConf `json:"-"`
WpScan WpScanConf `json:"-"`
Saas SaasConf `json:"-"`
ReportOpts
}
// ReportConf is an interface to Validate Report Config
type ReportConf interface {
Validate() []error
}
// ScanOpts is options for scan
type ScanOpts struct {
Vvv bool `json:"vvv,omitempty"`
}
// ReportOpts is options for report
type ReportOpts struct {
CvssScoreOver float64 `json:"cvssScoreOver,omitempty"`
ConfidenceScoreOver int `json:"confidenceScoreOver,omitempty"`
NoProgress bool `json:"noProgress,omitempty"`
RefreshCve bool `json:"refreshCve,omitempty"`
IgnoreUnfixed bool `json:"ignoreUnfixed,omitempty"`
IgnoreUnscoredCves bool `json:"ignoreUnscoredCves,omitempty"`
DiffPlus bool `json:"diffPlus,omitempty"`
DiffMinus bool `json:"diffMinus,omitempty"`
Diff bool `json:"diff,omitempty"`
Lang string `json:"lang,omitempty"`
TrivyOpts
}
// TrivyOpts is options for trivy DBs
type TrivyOpts struct {
TrivyCacheDBDir string `json:"trivyCacheDBDir,omitempty"`
TrivyDBRepositories []string `json:"trivyDBRepositories,omitempty"`
TrivyJavaDBRepositories []string `json:"trivyJavaDBRepositories,omitempty"`
TrivySkipJavaDBUpdate bool `json:"trivySkipJavaDBUpdate,omitempty"`
DetectDevLockfilePaths []string `json:"detectDevLockfilePaths,omitempty"`
}
// ValidateOnConfigtest validates
func (c Config) ValidateOnConfigtest() bool {
errs := c.checkSSHKeyExist()
if _, err := govalidator.ValidateStruct(c); err != nil {
errs = append(errs, err)
}
for _, err := range errs {
logging.Log.Error(err)
}
return len(errs) == 0
}
// ValidateOnScan validates configuration
func (c Config) ValidateOnScan() bool {
errs := c.checkSSHKeyExist()
if len(c.ResultsDir) != 0 {
if ok, _ := govalidator.IsFilePath(c.ResultsDir); !ok {
errs = append(errs, xerrors.Errorf(
"JSON base directory must be a *Absolute* file path. -results-dir: %s", c.ResultsDir))
}
}
if _, err := govalidator.ValidateStruct(c); err != nil {
errs = append(errs, err)
}
for _, server := range c.Servers {
if !server.Module.IsScanPort() {
continue
}
if es := server.PortScan.Validate(); 0 < len(es) {
errs = append(errs, es...)
}
if es := server.Windows.Validate(); 0 < len(es) {
errs = append(errs, es...)
}
}
for _, err := range errs {
logging.Log.Error(err)
}
return len(errs) == 0
}
func (c Config) checkSSHKeyExist() (errs []error) {
for serverName, v := range c.Servers {
if v.Type == constant.ServerTypePseudo {
continue
}
if v.KeyPath != "" {
if _, err := os.Stat(v.KeyPath); err != nil {
errs = append(errs, xerrors.Errorf(
"%s is invalid. keypath: %s not exists", serverName, v.KeyPath))
}
}
}
return errs
}
// ValidateOnReport validates configuration
func (c *Config) ValidateOnReport() bool {
errs := []error{}
if len(c.ResultsDir) != 0 {
if ok, _ := govalidator.IsFilePath(c.ResultsDir); !ok {
errs = append(errs, xerrors.Errorf(
"JSON base directory must be a *Absolute* file path. -results-dir: %s", c.ResultsDir))
}
}
_, err := govalidator.ValidateStruct(c)
if err != nil {
errs = append(errs, err)
}
for _, rc := range []ReportConf{
&c.EMail,
&c.Slack,
&c.ChatWork,
&c.GoogleChat,
&c.Telegram,
&c.Syslog,
&c.HTTP,
&c.AWS,
&c.Azure,
} {
if es := rc.Validate(); 0 < len(es) {
errs = append(errs, es...)
}
}
for _, cnf := range []VulnDictInterface{
&Conf.CveDict,
&Conf.Gost,
&Conf.Exploit,
&Conf.Metasploit,
&Conf.KEVuln,
&Conf.Cti,
} {
if err := cnf.Validate(); err != nil {
errs = append(errs, xerrors.Errorf("Failed to validate %s: %+v", cnf.GetName(), err))
}
if err := cnf.CheckHTTPHealth(); err != nil {
errs = append(errs, xerrors.Errorf("Run %s as server mode before reporting: %+v", cnf.GetName(), err))
}
}
for _, err := range errs {
logging.Log.Error(err)
}
return len(errs) == 0
}
// ValidateOnSaaS validates configuration
func (c Config) ValidateOnSaaS() bool {
saaserrs := c.Saas.Validate()
for _, err := range saaserrs {
logging.Log.Error("Failed to validate SaaS conf: %+w", err)
}
return len(saaserrs) == 0
}
// WpScanConf is wpscan.com config
type WpScanConf struct {
Token string `toml:"token,omitempty" json:"-"`
DetectInactive bool `toml:"detectInactive,omitempty" json:"detectInactive,omitempty"`
}
// ServerInfo has SSH Info, additional CPE packages to scan.
type ServerInfo struct {
BaseName string `toml:"-" json:"-"`
ServerName string `toml:"-" json:"serverName,omitempty"`
User string `toml:"user,omitempty" json:"user,omitempty"`
Host string `toml:"host,omitempty" json:"host,omitempty"`
IgnoreIPAddresses []string `toml:"ignoreIPAddresses,omitempty" json:"ignoreIPAddresses,omitempty"`
JumpServer []string `toml:"jumpServer,omitempty" json:"jumpServer,omitempty"`
Port string `toml:"port,omitempty" json:"port,omitempty"`
SSHConfigPath string `toml:"sshConfigPath,omitempty" json:"sshConfigPath,omitempty"`
KeyPath string `toml:"keyPath,omitempty" json:"keyPath,omitempty"`
CpeNames []string `toml:"cpeNames,omitempty" json:"cpeNames,omitempty"`
ScanMode []string `toml:"scanMode,omitempty" json:"scanMode,omitempty"`
ScanModules []string `toml:"scanModules,omitempty" json:"scanModules,omitempty"`
OwaspDCXMLPath string `toml:"owaspDCXMLPath,omitempty" json:"owaspDCXMLPath,omitempty"`
ContainersOnly bool `toml:"containersOnly,omitempty" json:"containersOnly,omitempty"`
ContainersIncluded []string `toml:"containersIncluded,omitempty" json:"containersIncluded,omitempty"`
ContainersExcluded []string `toml:"containersExcluded,omitempty" json:"containersExcluded,omitempty"`
ContainerType string `toml:"containerType,omitempty" json:"containerType,omitempty"`
Containers map[string]ContainerSetting `toml:"containers,omitempty" json:"containers,omitempty"`
IgnoreCves []string `toml:"ignoreCves,omitempty" json:"ignoreCves,omitempty"`
IgnorePkgsRegexp []string `toml:"ignorePkgsRegexp,omitempty" json:"ignorePkgsRegexp,omitempty"`
GitHubRepos map[string]GitHubConf `toml:"githubs" json:"githubs,omitempty"` // key: owner/repo
UUIDs map[string]string `toml:"uuids,omitempty" json:"uuids,omitempty"`
Memo string `toml:"memo,omitempty" json:"memo,omitempty"`
Enablerepo []string `toml:"enablerepo,omitempty" json:"enablerepo,omitempty"` // For CentOS, Alma, Rocky, RHEL, Amazon
Optional map[string]any `toml:"optional,omitempty" json:"optional,omitempty"` // Optional key-value set that will be outputted to JSON
Lockfiles []string `toml:"lockfiles,omitempty" json:"lockfiles,omitempty"` // ie) path/to/package-lock.json
FindLock bool `toml:"findLock,omitempty" json:"findLock,omitempty"`
FindLockDirs []string `toml:"findLockDirs,omitempty" json:"findLockDirs,omitempty"`
Type string `toml:"type,omitempty" json:"type,omitempty"` // "pseudo" or ""
IgnoredJSONKeys []string `toml:"ignoredJSONKeys,omitempty" json:"ignoredJSONKeys,omitempty"`
WordPress *WordPressConf `toml:"wordpress,omitempty" json:"wordpress,omitempty"`
PortScan *PortScanConf `toml:"portscan,omitempty" json:"portscan,omitempty"`
Windows *WindowsConf `toml:"windows,omitempty" json:"windows,omitempty"`
IPv4Addrs []string `toml:"-" json:"ipv4Addrs,omitempty"`
IPv6Addrs []string `toml:"-" json:"ipv6Addrs,omitempty"`
IPSIdentifiers map[string]string `toml:"-" json:"ipsIdentifiers,omitempty"`
// internal use
LogMsgAnsiColor string `toml:"-" json:"-"` // DebugLog Color
Container Container `toml:"-" json:"-"`
Distro Distro `toml:"-" json:"-"`
Mode ScanMode `toml:"-" json:"-"`
Module ScanModule `toml:"-" json:"-"`
}
// ContainerSetting is used for loading container setting in config.toml
type ContainerSetting struct {
Cpes []string `json:"cpes,omitempty"`
OwaspDCXMLPath string `json:"owaspDCXMLPath,omitempty"`
IgnorePkgsRegexp []string `json:"ignorePkgsRegexp,omitempty"`
IgnoreCves []string `json:"ignoreCves,omitempty"`
}
// WordPressConf used for WordPress Scanning
type WordPressConf struct {
OSUser string `toml:"osUser,omitempty" json:"osUser,omitempty"`
DocRoot string `toml:"docRoot,omitempty" json:"docRoot,omitempty"`
CmdPath string `toml:"cmdPath,omitempty" json:"cmdPath,omitempty"`
NoSudo bool `toml:"noSudo,omitempty" json:"noSudo,omitempty"`
}
// IsZero return whether this struct is not specified in config.toml
func (cnf WordPressConf) IsZero() bool {
return cnf.OSUser == "" && cnf.DocRoot == "" && cnf.CmdPath == ""
}
// GitHubConf is used for GitHub Security Alerts
type GitHubConf struct {
Token string `json:"-"`
IgnoreGitHubDismissed bool `json:"ignoreGitHubDismissed,omitempty"`
}
// GetServerName returns ServerName if this serverInfo is about host.
// If this serverInfo is about a container, returns containerID@ServerName
func (s ServerInfo) GetServerName() string {
if len(s.Container.ContainerID) == 0 {
return s.ServerName
}
return fmt.Sprintf("%s@%s", s.Container.Name, s.ServerName)
}
// Distro has distribution info
type Distro struct {
Family string
Release string
}
func (l Distro) String() string {
return fmt.Sprintf("%s %s", l.Family, l.Release)
}
// MajorVersion returns Major version
func (l Distro) MajorVersion() (int, error) {
switch l.Family {
case constant.Amazon:
return strconv.Atoi(getAmazonLinuxVersion(l.Release))
case constant.CentOS:
if 0 < len(l.Release) {
return strconv.Atoi(strings.Split(strings.TrimPrefix(l.Release, "stream"), ".")[0])
}
case constant.OpenSUSE:
if l.Release != "" {
if l.Release == "tumbleweed" {
return 0, nil
}
return strconv.Atoi(strings.Split(l.Release, ".")[0])
}
default:
if 0 < len(l.Release) {
return strconv.Atoi(strings.Split(l.Release, ".")[0])
}
}
return 0, xerrors.New("Release is empty")
}
// IsContainer returns whether this ServerInfo is about container
func (s ServerInfo) IsContainer() bool {
return 0 < len(s.Container.ContainerID)
}
// SetContainer set container
func (s *ServerInfo) SetContainer(d Container) {
s.Container = d
}
// Container has Container information.
type Container struct {
ContainerID string
Name string
Image string
}
================================================
FILE: config/config_test.go
================================================
package config
import (
"testing"
"github.com/future-architect/vuls/constant"
)
func TestDistro_MajorVersion(t *testing.T) {
var tests = []struct {
in Distro
out int
}{
{
in: Distro{
Family: constant.Amazon,
Release: "2022 (Amazon Linux)",
},
out: 2022,
},
{
in: Distro{
Family: constant.Amazon,
Release: "2 (2017.12)",
},
out: 2,
},
{
in: Distro{
Family: constant.Amazon,
Release: "2017.12",
},
out: 1,
},
{
in: Distro{
Family: constant.CentOS,
Release: "7.10",
},
out: 7,
},
}
for i, tt := range tests {
ver, err := tt.in.MajorVersion()
if err != nil {
t.Errorf("[%d] err occurred: %s", i, err)
}
if tt.out != ver {
t.Errorf("[%d] expected %d, actual %d", i, tt.out, ver)
}
}
}
================================================
FILE: config/config_v1.go
================================================
package config
import (
"bytes"
"encoding/json"
"fmt"
"os"
"strings"
"github.com/BurntSushi/toml"
"golang.org/x/xerrors"
)
// ConfV1 has old version Configuration for windows
var ConfV1 V1
// V1 is Struct of Configuration
type V1 struct {
Version string
Servers map[string]Server
Proxy ProxyConfig
}
// Server is Configuration of the server to be scanned.
type Server struct {
Host string
UUID string
WinUpdateSrc string
WinUpdateSrcInt int `json:"-" toml:"-"` // for internal used (not specified in config.toml)
CabPath string
IgnoredJSONKeys []string
}
// WinUpdateSrcVulsDefault is default value of WinUpdateSrc
const WinUpdateSrcVulsDefault = 2
// Windows const
const (
SystemDefault = 0
WSUS = 1
WinUpdateDirect = 2
LocalCab = 3
)
// ProxyConfig is struct of Proxy configuration
type ProxyConfig struct {
ProxyURL string
BypassList string
}
// Path of saas-credential.json
var pathToSaasJSON = "./saas-credential.json"
var vulsAuthURL = "https://auth.vuls.biz/one-time-auth"
func convertToLatestConfig(pathToToml string) error {
var convertedServerConfigList = make(map[string]ServerInfo)
for _, server := range ConfV1.Servers {
switch server.WinUpdateSrc {
case "":
server.WinUpdateSrcInt = WinUpdateSrcVulsDefault
case "0":
server.WinUpdateSrcInt = SystemDefault
case "1":
server.WinUpdateSrcInt = WSUS
case "2":
server.WinUpdateSrcInt = WinUpdateDirect
case "3":
server.WinUpdateSrcInt = LocalCab
if server.CabPath == "" {
return xerrors.Errorf("Failed to load CabPath. err: CabPath is empty")
}
default:
return xerrors.Errorf(`Specify WindUpdateSrc in "0"|"1"|"2"|"3"`)
}
convertedServerConfig := ServerInfo{
Host: server.Host,
Port: "local",
UUIDs: map[string]string{server.Host: server.UUID},
IgnoredJSONKeys: server.IgnoredJSONKeys,
Windows: &WindowsConf{
CabPath: server.CabPath,
ServerSelection: server.WinUpdateSrcInt,
},
}
convertedServerConfigList[server.Host] = convertedServerConfig
}
Conf.Servers = convertedServerConfigList
raw, err := os.ReadFile(pathToSaasJSON)
if err != nil {
return xerrors.Errorf("Failed to read saas-credential.json. err: %w", err)
}
saasJSON := SaasConf{}
if err := json.Unmarshal(raw, &saasJSON); err != nil {
return xerrors.Errorf("Failed to unmarshal saas-credential.json. err: %w", err)
}
Conf.Saas = SaasConf{
GroupID: saasJSON.GroupID,
Token: saasJSON.Token,
URL: vulsAuthURL,
}
c := struct {
Version string `toml:"version"`
Saas *SaasConf `toml:"saas"`
Default ServerInfo `toml:"default"`
Servers map[string]ServerInfo `toml:"servers"`
}{
Version: "v2",
Saas: &Conf.Saas,
Default: Conf.Default,
Servers: Conf.Servers,
}
// rename the current config.toml to config.toml.bak
info, err := os.Lstat(pathToToml)
if err != nil {
return xerrors.Errorf("Failed to lstat %s: %w", pathToToml, err)
}
realPath := pathToToml
if info.Mode()&os.ModeSymlink == os.ModeSymlink {
if realPath, err = os.Readlink(pathToToml); err != nil {
return xerrors.Errorf("Failed to Read link %s: %w", pathToToml, err)
}
}
if err := os.Rename(realPath, realPath+".bak"); err != nil {
return xerrors.Errorf("Failed to rename %s: %w", pathToToml, err)
}
var buf bytes.Buffer
if err := toml.NewEncoder(&buf).Encode(c); err != nil {
return xerrors.Errorf("Failed to encode to toml: %w", err)
}
str := strings.ReplaceAll(buf.String(), "\n [", "\n\n [")
str = fmt.Sprintf("%s\n\n%s",
"# See README for details: https://vuls.io/docs/en/config.toml.html",
str)
return os.WriteFile(realPath, []byte(str), 0600)
}
================================================
FILE: config/googlechatconf.go
================================================
package config
import (
"github.com/asaskevich/govalidator"
"golang.org/x/xerrors"
)
// GoogleChatConf is GoogleChat config
type GoogleChatConf struct {
WebHookURL string `valid:"url" json:"-" toml:"webHookURL,omitempty"`
SkipIfNoCve bool `valid:"type(bool)" json:"-" toml:"skipIfNoCve"`
ServerNameRegexp string `valid:"type(string)" json:"-" toml:"serverNameRegexp,omitempty"`
Enabled bool `valid:"type(bool)" json:"-" toml:"-"`
}
// Validate validates configuration
func (c *GoogleChatConf) Validate() (errs []error) {
if !c.Enabled {
return
}
if len(c.WebHookURL) == 0 {
errs = append(errs, xerrors.New("googleChatConf.webHookURL must not be empty"))
}
if !govalidator.IsRegex(c.ServerNameRegexp) {
errs = append(errs, xerrors.New("googleChatConf.serverNameRegexp must be regex"))
}
_, err := govalidator.ValidateStruct(c)
if err != nil {
errs = append(errs, err)
}
return
}
================================================
FILE: config/httpconf.go
================================================
package config
import (
"os"
"github.com/asaskevich/govalidator"
)
// HTTPConf is HTTP config
type HTTPConf struct {
URL string `valid:"url" json:"-"`
Enabled bool `toml:"-" json:"-"`
}
const httpKey = "VULS_HTTP_URL"
// Validate validates configuration
func (c *HTTPConf) Validate() (errs []error) {
if !c.Enabled {
return nil
}
// overwrite if env var is not empty
if os.Getenv(httpKey) != "" {
c.URL = os.Getenv(httpKey)
}
if _, err := govalidator.ValidateStruct(c); err != nil {
errs = append(errs, err)
}
return errs
}
================================================
FILE: config/jsonloader.go
================================================
package config
import "golang.org/x/xerrors"
// JSONLoader loads configuration
type JSONLoader struct {
}
// Load load the configuration JSON file specified by path arg.
func (c JSONLoader) Load(_, _, _ string) (err error) {
return xerrors.New("Not implement yet")
}
================================================
FILE: config/loader.go
================================================
package config
// Load loads configuration
func Load(path string) error {
loader := TOMLLoader{}
return loader.Load(path)
}
// Loader is interface of concrete loader
type Loader interface {
Load(string, string) error
}
================================================
FILE: config/os.go
================================================
package config
import (
"fmt"
"strings"
"time"
"github.com/future-architect/vuls/constant"
)
// EOL has End-of-Life information
type EOL struct {
StandardSupportUntil time.Time
ExtendedSupportUntil time.Time
Ended bool
}
// IsStandardSupportEnded checks now is under standard support
func (e EOL) IsStandardSupportEnded(now time.Time) bool {
return e.Ended ||
!e.ExtendedSupportUntil.IsZero() && e.StandardSupportUntil.IsZero() ||
!e.StandardSupportUntil.IsZero() && now.After(e.StandardSupportUntil)
}
// IsExtendedSuppportEnded checks now is under extended support
func (e EOL) IsExtendedSuppportEnded(now time.Time) bool {
if e.Ended {
return true
}
if e.StandardSupportUntil.IsZero() && e.ExtendedSupportUntil.IsZero() {
return false
}
return !e.ExtendedSupportUntil.IsZero() && now.After(e.ExtendedSupportUntil) ||
e.ExtendedSupportUntil.IsZero() && now.After(e.StandardSupportUntil)
}
// GetEOL return EOL information for the OS-release passed by args
// https://github.com/aquasecurity/trivy/blob/master/pkg/detector/ospkg/redhat/redhat.go#L20
func GetEOL(family, release string) (eol EOL, found bool) {
switch family {
case constant.Amazon:
eol, found = map[string]EOL{
"1": {StandardSupportUntil: time.Date(2023, 12, 31, 23, 59, 59, 0, time.UTC)},
"2": {StandardSupportUntil: time.Date(2026, 6, 30, 23, 59, 59, 0, time.UTC)},
"2022": {StandardSupportUntil: time.Date(2026, 6, 30, 23, 59, 59, 0, time.UTC)},
"2023": {StandardSupportUntil: time.Date(2029, 6, 30, 23, 59, 59, 0, time.UTC)},
"2027": {StandardSupportUntil: time.Date(2031, 6, 30, 23, 59, 59, 0, time.UTC)},
"2029": {StandardSupportUntil: time.Date(2033, 6, 30, 23, 59, 59, 0, time.UTC)},
}[getAmazonLinuxVersion(release)]
case constant.RedHat:
// https://access.redhat.com/support/policy/updates/errata
eol, found = map[string]EOL{
"3": {Ended: true},
"4": {Ended: true},
"5": {Ended: true},
"6": {
StandardSupportUntil: time.Date(2020, 11, 30, 23, 59, 59, 0, time.UTC),
ExtendedSupportUntil: time.Date(2024, 6, 30, 23, 59, 59, 0, time.UTC),
},
"7": {
StandardSupportUntil: time.Date(2024, 6, 30, 23, 59, 59, 0, time.UTC),
ExtendedSupportUntil: time.Date(2028, 6, 30, 23, 59, 59, 0, time.UTC),
},
"8": {
StandardSupportUntil: time.Date(2029, 5, 31, 23, 59, 59, 0, time.UTC),
ExtendedSupportUntil: time.Date(2032, 5, 31, 23, 59, 59, 0, time.UTC),
},
"9": {
StandardSupportUntil: time.Date(2032, 5, 31, 23, 59, 59, 0, time.UTC),
ExtendedSupportUntil: time.Date(2035, 5, 31, 23, 59, 59, 0, time.UTC),
},
"10": {
StandardSupportUntil: time.Date(2035, 5, 31, 23, 59, 59, 0, time.UTC),
ExtendedSupportUntil: time.Date(2038, 5, 31, 23, 59, 59, 0, time.UTC),
},
}[major(release)]
case constant.CentOS:
// https://en.wikipedia.org/wiki/CentOS#End-of-support_schedule
eol, found = map[string]EOL{
"3": {Ended: true},
"4": {Ended: true},
"5": {Ended: true},
"6": {Ended: true},
"7": {StandardSupportUntil: time.Date(2024, 6, 30, 23, 59, 59, 0, time.UTC)},
"8": {StandardSupportUntil: time.Date(2021, 12, 31, 23, 59, 59, 0, time.UTC)},
"stream8": {StandardSupportUntil: time.Date(2024, 5, 31, 23, 59, 59, 0, time.UTC)},
"stream9": {StandardSupportUntil: time.Date(2027, 5, 31, 23, 59, 59, 0, time.UTC)},
"stream10": {StandardSupportUntil: time.Date(2030, 1, 1, 0, 0, 0, 0, time.UTC)},
}[major(release)]
case constant.Alma:
eol, found = map[string]EOL{
"8": {StandardSupportUntil: time.Date(2029, 5, 31, 23, 59, 59, 0, time.UTC)},
"9": {StandardSupportUntil: time.Date(2032, 5, 31, 23, 59, 59, 0, time.UTC)},
"10": {StandardSupportUntil: time.Date(2035, 5, 31, 23, 59, 59, 0, time.UTC)},
}[major(release)]
case constant.Rocky:
eol, found = map[string]EOL{
"8": {StandardSupportUntil: time.Date(2029, 5, 31, 23, 59, 59, 0, time.UTC)},
"9": {StandardSupportUntil: time.Date(2032, 5, 31, 23, 59, 59, 0, time.UTC)},
"10": {StandardSupportUntil: time.Date(2035, 5, 31, 23, 59, 59, 0, time.UTC)},
}[major(release)]
case constant.Oracle:
eol, found = map[string]EOL{
// Source:
// https://www.oracle.com/a/ocom/docs/elsp-lifetime-069338.pdf
// https://community.oracle.com/docs/DOC-917964
"3": {Ended: true},
"4": {Ended: true},
"5": {Ended: true},
"6": {
StandardSupportUntil: time.Date(2021, 3, 1, 23, 59, 59, 0, time.UTC),
ExtendedSupportUntil: time.Date(2024, 6, 1, 23, 59, 59, 0, time.UTC),
},
"7": {
StandardSupportUntil: time.Date(2024, 7, 1, 23, 59, 59, 0, time.UTC),
ExtendedSupportUntil: time.Date(2026, 6, 1, 23, 59, 59, 0, time.UTC),
},
"8": {
StandardSupportUntil: time.Date(2029, 7, 1, 23, 59, 59, 0, time.UTC),
ExtendedSupportUntil: time.Date(2031, 7, 1, 23, 59, 59, 0, time.UTC),
},
"9": {
StandardSupportUntil: time.Date(2032, 6, 1, 23, 59, 59, 0, time.UTC),
ExtendedSupportUntil: time.Date(2034, 6, 1, 23, 59, 59, 0, time.UTC),
},
"10": {},
}[major(release)]
case constant.Debian:
eol, found = map[string]EOL{
// https://wiki.debian.org/LTS
"6": {Ended: true},
"7": {Ended: true},
"8": {Ended: true},
"9": {StandardSupportUntil: time.Date(2022, 6, 30, 23, 59, 59, 0, time.UTC)},
"10": {StandardSupportUntil: time.Date(2024, 6, 30, 23, 59, 59, 0, time.UTC)},
"11": {StandardSupportUntil: time.Date(2026, 6, 30, 23, 59, 59, 0, time.UTC)},
"12": {StandardSupportUntil: time.Date(2028, 6, 30, 23, 59, 59, 0, time.UTC)},
"13": {StandardSupportUntil: time.Date(2030, 6, 30, 23, 59, 59, 0, time.UTC)},
// "14": {StandardSupportUntil: time.Date(2032, 6, 30, 23, 59, 59, 0, time.UTC)},
// "15": {StandardSupportUntil: time.Date(2034, 6, 30, 23, 59, 59, 0, time.UTC)},
}[major(release)]
case constant.Raspbian:
// Not found
eol, found = map[string]EOL{}[major(release)]
case constant.Ubuntu:
// https://wiki.ubuntu.com/Releases
eol, found = map[string]EOL{
"6.06": {Ended: true},
"6.10": {Ended: true},
"7.04": {Ended: true},
"7.10": {Ended: true},
"8.04": {Ended: true},
"8.10": {Ended: true},
"9.04": {Ended: true},
"9.10": {Ended: true},
"10.04": {Ended: true},
"10.10": {Ended: true},
"11.04": {Ended: true},
"11.10": {Ended: true},
"12.04": {Ended: true},
"12.10": {Ended: true},
"13.04": {Ended: true},
"13.10": {Ended: true},
"14.04": {
ExtendedSupportUntil: time.Date(2022, 4, 1, 23, 59, 59, 0, time.UTC),
},
"14.10": {Ended: true},
"15.04": {Ended: true},
"15.10": {Ended: true},
"16.04": {
StandardSupportUntil: time.Date(2021, 4, 1, 23, 59, 59, 0, time.UTC),
ExtendedSupportUntil: time.Date(2024, 4, 1, 23, 59, 59, 0, time.UTC),
},
"16.10": {Ended: true},
"17.04": {Ended: true},
"17.10": {Ended: true},
"18.04": {
StandardSupportUntil: time.Date(2023, 4, 1, 23, 59, 59, 0, time.UTC),
ExtendedSupportUntil: time.Date(2028, 4, 1, 23, 59, 59, 0, time.UTC),
},
"18.10": {Ended: true},
"19.04": {Ended: true},
"19.10": {Ended: true},
"20.04": {
StandardSupportUntil: time.Date(2025, 4, 1, 23, 59, 59, 0, time.UTC),
ExtendedSupportUntil: time.Date(2030, 4, 1, 23, 59, 59, 0, time.UTC),
},
"20.10": {
StandardSupportUntil: time.Date(2021, 7, 22, 23, 59, 59, 0, time.UTC),
},
"21.04": {
StandardSupportUntil: time.Date(2022, 1, 20, 23, 59, 59, 0, time.UTC),
},
"21.10": {
StandardSupportUntil: time.Date(2022, 7, 14, 23, 59, 59, 0, time.UTC),
},
"22.04": {
StandardSupportUntil: time.Date(2027, 4, 1, 23, 59, 59, 0, time.UTC),
ExtendedSupportUntil: time.Date(2032, 4, 1, 23, 59, 59, 0, time.UTC),
},
"22.10": {
StandardSupportUntil: time.Date(2023, 7, 20, 23, 59, 59, 0, time.UTC),
},
"23.04": {
StandardSupportUntil: time.Date(2024, 1, 25, 23, 59, 59, 0, time.UTC),
},
"23.10": {
StandardSupportUntil: time.Date(2024, 7, 11, 23, 59, 59, 0, time.UTC),
},
"24.04": {
StandardSupportUntil: time.Date(2029, 6, 30, 23, 59, 59, 0, time.UTC),
},
"24.10": {
StandardSupportUntil: time.Date(2025, 7, 10, 23, 59, 59, 0, time.UTC),
},
"25.04": {
StandardSupportUntil: time.Date(2026, 1, 15, 23, 59, 59, 0, time.UTC),
},
"25.10": {
StandardSupportUntil: time.Date(2026, 7, 31, 23, 59, 59, 0, time.UTC),
},
}[release]
case constant.OpenSUSE:
// https://en.opensuse.org/Lifetime
eol, found = map[string]EOL{
"10.2": {Ended: true},
"10.3": {Ended: true},
"11.0": {Ended: true},
"11.1": {Ended: true},
"11.2": {Ended: true},
"11.3": {Ended: true},
"11.4": {Ended: true},
"12.1": {Ended: true},
"12.2": {Ended: true},
"12.3": {Ended: true},
"13.1": {Ended: true},
"13.2": {Ended: true},
"tumbleweed": {},
}[release]
case constant.OpenSUSELeap:
// https://en.opensuse.org/Lifetime
eol, found = map[string]EOL{
"42.1": {Ended: true},
"42.2": {Ended: true},
"42.3": {Ended: true},
"15.0": {Ended: true},
"15.1": {Ended: true},
"15.2": {Ended: true},
"15.3": {StandardSupportUntil: time.Date(2022, 12, 31, 23, 59, 59, 0, time.UTC)},
"15.4": {StandardSupportUntil: time.Date(2023, 12, 31, 23, 59, 59, 0, time.UTC)},
"15.5": {StandardSupportUntil: time.Date(2024, 12, 31, 23, 59, 59, 0, time.UTC)},
"15.6": {StandardSupportUntil: time.Date(2025, 12, 31, 23, 59, 59, 0, time.UTC)},
}[release]
case constant.SUSEEnterpriseServer:
// https://www.suse.com/lifecycle
eol, found = map[string]EOL{
"11": {Ended: true},
"11.1": {Ended: true},
"11.2": {Ended: true},
"11.3": {Ended: true},
"11.4": {Ended: true},
"12": {Ended: true},
"12.1": {Ended: true},
"12.2": {Ended: true},
"12.3": {Ended: true},
"12.4": {Ended: true},
"12.5": {StandardSupportUntil: time.Date(2024, 10, 31, 23, 59, 59, 0, time.UTC)},
"15": {Ended: true},
"15.1": {Ended: true},
"15.2": {Ended: true},
"15.3": {StandardSupportUntil: time.Date(2022, 12, 31, 23, 59, 59, 0, time.UTC)},
"15.4": {StandardSupportUntil: time.Date(2023, 12, 31, 23, 59, 59, 0, time.UTC)},
"15.5": {},
"15.6": {},
"15.7": {StandardSupportUntil: time.Date(2028, 7, 31, 23, 59, 59, 0, time.UTC)},
}[release]
case constant.SUSEEnterpriseDesktop:
// https://www.suse.com/lifecycle
eol, found = map[string]EOL{
"11": {Ended: true},
"11.1": {Ended: true},
"11.2": {Ended: true},
"11.3": {Ended: true},
"11.4": {Ended: true},
"12": {Ended: true},
"12.1": {Ended: true},
"12.2": {Ended: true},
"12.3": {Ended: true},
"12.4": {Ended: true},
"15": {Ended: true},
"15.1": {Ended: true},
"15.2": {Ended: true},
"15.3": {StandardSupportUntil: time.Date(2022, 12, 31, 23, 59, 59, 0, time.UTC)},
"15.4": {StandardSupportUntil: time.Date(2023, 12, 31, 23, 59, 59, 0, time.UTC)},
"15.5": {},
"15.6": {},
"15.7": {StandardSupportUntil: time.Date(2028, 7, 31, 23, 59, 59, 0, time.UTC)},
}[release]
case constant.Alpine:
// https://github.com/aquasecurity/trivy/blob/master/pkg/detector/ospkg/alpine/alpine.go#L19
// https://alpinelinux.org/releases/
eol, found = map[string]EOL{
"2.0": {Ended: true},
"2.1": {Ended: true},
"2.2": {Ended: true},
"2.3": {Ended: true},
"2.4": {Ended: true},
"2.5": {Ended: true},
"2.6": {Ended: true},
"2.7": {Ended: true},
"3.0": {Ended: true},
"3.1": {Ended: true},
"3.2": {Ended: true},
"3.3": {Ended: true},
"3.4": {Ended: true},
"3.5": {Ended: true},
"3.6": {Ended: true},
"3.7": {Ended: true},
"3.8": {Ended: true},
"3.9": {Ended: true},
"3.10": {StandardSupportUntil: time.Date(2021, 5, 1, 23, 59, 59, 0, time.UTC)},
"3.11": {StandardSupportUntil: time.Date(2021, 11, 1, 23, 59, 59, 0, time.UTC)},
"3.12": {StandardSupportUntil: time.Date(2022, 5, 1, 23, 59, 59, 0, time.UTC)},
"3.13": {StandardSupportUntil: time.Date(2022, 11, 1, 23, 59, 59, 0, time.UTC)},
"3.14": {StandardSupportUntil: time.Date(2023, 5, 1, 23, 59, 59, 0, time.UTC)},
"3.15": {StandardSupportUntil: time.Date(2023, 11, 1, 23, 59, 59, 0, time.UTC)},
"3.16": {StandardSupportUntil: time.Date(2024, 5, 23, 23, 59, 59, 0, time.UTC)},
"3.17": {StandardSupportUntil: time.Date(2024, 11, 22, 23, 59, 59, 0, time.UTC)},
"3.18": {StandardSupportUntil: time.Date(2025, 5, 9, 23, 59, 59, 0, time.UTC)},
"3.19": {StandardSupportUntil: time.Date(2025, 11, 1, 23, 59, 59, 0, time.UTC)},
"3.20": {StandardSupportUntil: time.Date(2026, 4, 1, 23, 59, 59, 0, time.UTC)},
"3.21": {StandardSupportUntil: time.Date(2026, 11, 1, 23, 59, 59, 0, time.UTC)},
"3.22": {StandardSupportUntil: time.Date(2027, 5, 1, 23, 59, 59, 0, time.UTC)},
"3.23": {StandardSupportUntil: time.Date(2027, 11, 1, 23, 59, 59, 0, time.UTC)},
}[majorDotMinor(release)]
case constant.FreeBSD:
// https://www.freebsd.org/security/
eol, found = map[string]EOL{
"7": {Ended: true},
"8": {Ended: true},
"9": {Ended: true},
"10": {Ended: true},
"11": {StandardSupportUntil: time.Date(2021, 9, 30, 23, 59, 59, 0, time.UTC)},
"12": {StandardSupportUntil: time.Date(2023, 12, 31, 23, 59, 59, 0, time.UTC)},
"13": {StandardSupportUntil: time.Date(2026, 4, 30, 23, 59, 59, 0, time.UTC)},
"14": {StandardSupportUntil: time.Date(2028, 11, 30, 23, 59, 59, 0, time.UTC)},
}[major(release)]
case constant.Fedora:
// https://docs.fedoraproject.org/en-US/releases/eol/
// https://endoflife.date/fedora
eol, found = map[string]EOL{
"32": {StandardSupportUntil: time.Date(2021, 5, 24, 23, 59, 59, 0, time.UTC)},
"33": {StandardSupportUntil: time.Date(2021, 11, 29, 23, 59, 59, 0, time.UTC)},
"34": {StandardSupportUntil: time.Date(2022, 6, 6, 23, 59, 59, 0, time.UTC)},
"35": {StandardSupportUntil: time.Date(2022, 12, 12, 23, 59, 59, 0, time.UTC)},
"36": {StandardSupportUntil: time.Date(2023, 5, 15, 23, 59, 59, 0, time.UTC)},
"37": {StandardSupportUntil: time.Date(2023, 12, 4, 23, 59, 59, 0, time.UTC)},
"38": {StandardSupportUntil: time.Date(2024, 5, 20, 23, 59, 59, 0, time.UTC)},
"39": {StandardSupportUntil: time.Date(2024, 11, 25, 23, 59, 59, 0, time.UTC)},
"40": {StandardSupportUntil: time.Date(2025, 5, 12, 23, 59, 59, 0, time.UTC)},
"41": {StandardSupportUntil: time.Date(2025, 12, 14, 23, 59, 59, 0, time.UTC)},
"42": {StandardSupportUntil: time.Date(2026, 5, 13, 23, 59, 59, 0, time.UTC)},
}[major(release)]
case constant.Windows:
// https://learn.microsoft.com/ja-jp/lifecycle/products/?products=windows
lhs, rhs, _ := strings.Cut(strings.TrimSuffix(release, "(Server Core installation)"), "for")
switch strings.TrimSpace(lhs) {
case "Windows 7":
eol, found = EOL{StandardSupportUntil: time.Date(2013, 4, 9, 23, 59, 59, 0, time.UTC)}, true
if strings.Contains(rhs, "Service Pack 1") {
eol, found = EOL{StandardSupportUntil: time.Date(2020, 1, 14, 23, 59, 59, 0, time.UTC)}, true
}
case "Windows 8":
eol, found = EOL{StandardSupportUntil: time.Date(2016, 1, 12, 23, 59, 59, 0, time.UTC)}, true
case "Windows 8.1":
eol, found = EOL{StandardSupportUntil: time.Date(2023, 1, 10, 23, 59, 59, 0, time.UTC)}, true
case "Windows 10":
eol, found = EOL{StandardSupportUntil: time.Date(2017, 5, 9, 23, 59, 59, 0, time.UTC)}, true
case "Windows 10 Version 1511":
eol, found = EOL{StandardSupportUntil: time.Date(2017, 10, 10, 23, 59, 59, 0, time.UTC)}, true
case "Windows 10 Version 1607":
eol, found = EOL{StandardSupportUntil: time.Date(2018, 4, 10, 23, 59, 59, 0, time.UTC)}, true
case "Windows 10 Version 1703":
eol, found = EOL{StandardSupportUntil: time.Date(2018, 10, 9, 23, 59, 59, 0, time.UTC)}, true
case "Windows 10 Version 1709":
eol, found = EOL{StandardSupportUntil: time.Date(2019, 4, 9, 23, 59, 59, 0, time.UTC)}, true
case "Windows 10 Version 1803":
eol, found = EOL{StandardSupportUntil: time.Date(2019, 11, 12, 23, 59, 59, 0, time.UTC)}, true
case "Windows 10 Version 1809":
eol, found = EOL{StandardSupportUntil: time.Date(2020, 11, 10, 23, 59, 59, 0, time.UTC)}, true
case "Windows 10 Version 1903":
eol, found = EOL{StandardSupportUntil: time.Date(2020, 12, 8, 23, 59, 59, 0, time.UTC)}, true
case "Windows 10 Version 1909":
eol, found = EOL{StandardSupportUntil: time.Date(2021, 5, 11, 23, 59, 59, 0, time.UTC)}, true
case "Windows 10 Version 2004":
eol, found = EOL{StandardSupportUntil: time.Date(2021, 12, 14, 23, 59, 59, 0, time.UTC)}, true
case "Windows 10 Version 20H2":
eol, found = EOL{StandardSupportUntil: time.Date(2022, 5, 10, 23, 59, 59, 0, time.UTC)}, true
case "Windows 10 Version 21H1":
eol, found = EOL{StandardSupportUntil: time.Date(2022, 12, 13, 23, 59, 59, 0, time.UTC)}, true
case "Windows 10 Version 21H2":
eol, found = EOL{StandardSupportUntil: time.Date(2024, 6, 11, 23, 59, 59, 0, time.UTC)}, true
case "Windows 10 Version 22H2":
eol, found = EOL{StandardSupportUntil: time.Date(2025, 10, 14, 23, 59, 59, 0, time.UTC)}, true
case "Windows 11 Version 21H2":
eol, found = EOL{StandardSupportUntil: time.Date(2024, 10, 8, 23, 59, 59, 0, time.UTC)}, true
case "Windows 11 Version 22H2":
eol, found = EOL{StandardSupportUntil: time.Date(2025, 10, 14, 23, 59, 59, 0, time.UTC)}, true
case "Windows 11 Version 23H2":
eol, found = EOL{StandardSupportUntil: time.Date(2026, 11, 10, 23, 59, 59, 0, time.UTC)}, true
case "Windows 11 Version 24H2":
eol, found = EOL{StandardSupportUntil: time.Date(2027, 10, 12, 23, 59, 59, 0, time.UTC)}, true
case "Windows 11 Version 25H2":
eol, found = EOL{StandardSupportUntil: time.Date(2028, 10, 10, 23, 59, 59, 0, time.UTC)}, true
// case "Windows 11 Version 26H1":
// eol, found = EOL{StandardSupportUntil: time.Date(2029, 10, 8, 23, 59, 59, 0, time.UTC)}, true
case "Windows Server 2008":
eol, found = EOL{StandardSupportUntil: time.Date(2011, 7, 12, 23, 59, 59, 0, time.UTC)}, true
if strings.Contains(rhs, "Service Pack 2") {
eol, found = EOL{StandardSupportUntil: time.Date(2020, 1, 14, 23, 59, 59, 0, time.UTC)}, true
}
case "Windows Server 2008 R2":
eol, found = EOL{StandardSupportUntil: time.Date(2013, 4, 9, 23, 59, 59, 0, time.UTC)}, true
if strings.Contains(rhs, "Service Pack 1") {
eol, found = EOL{StandardSupportUntil: time.Date(2020, 1, 14, 23, 59, 59, 0, time.UTC)}, true
}
case "Windows Server 2012":
eol, found = EOL{StandardSupportUntil: time.Date(2023, 10, 10, 23, 59, 59, 0, time.UTC)}, true
case "Windows Server 2012 R2":
eol, found = EOL{StandardSupportUntil: time.Date(2023, 10, 10, 23, 59, 59, 0, time.UTC)}, true
case "Windows Server 2016":
eol, found = EOL{StandardSupportUntil: time.Date(2027, 1, 12, 23, 59, 59, 0, time.UTC)}, true
case "Windows Server, Version 1709":
eol, found = EOL{StandardSupportUntil: time.Date(2019, 4, 9, 23, 59, 59, 0, time.UTC)}, true
case "Windows Server, Version 1803":
eol, found = EOL{StandardSupportUntil: time.Date(2019, 11, 12, 23, 59, 59, 0, time.UTC)}, true
case "Windows Server, Version 1809":
eol, found = EOL{StandardSupportUntil: time.Date(2020, 11, 10, 23, 59, 59, 0, time.UTC)}, true
case "Windows Server 2019":
eol, found = EOL{StandardSupportUntil: time.Date(2029, 1, 9, 23, 59, 59, 0, time.UTC)}, true
case "Windows Server, Version 1903":
eol, found = EOL{StandardSupportUntil: time.Date(2020, 12, 8, 23, 59, 59, 0, time.UTC)}, true
case "Windows Server, Version 1909":
eol, found = EOL{StandardSupportUntil: time.Date(2021, 5, 11, 23, 59, 59, 0, time.UTC)}, true
case "Windows Server, Version 2004":
eol, found = EOL{StandardSupportUntil: time.Date(2021, 12, 14, 23, 59, 59, 0, time.UTC)}, true
case "Windows Server, Version 20H2":
eol, found = EOL{StandardSupportUntil: time.Date(2022, 8, 9, 23, 59, 59, 0, time.UTC)}, true
case "Windows Server 2022":
eol, found = EOL{StandardSupportUntil: time.Date(2031, 10, 14, 23, 59, 59, 0, time.UTC)}, true
case "Windows Server 2022, 23H2 Edition":
eol, found = EOL{}, true
case "Windows Server 2025":
eol, found = EOL{StandardSupportUntil: time.Date(2034, 10, 10, 23, 59, 59, 0, time.UTC)}, true
default:
}
case constant.MacOSX, constant.MacOSXServer:
eol, found = map[string]EOL{
"10.0": {Ended: true},
"10.1": {Ended: true},
"10.2": {Ended: true},
"10.3": {Ended: true},
"10.4": {Ended: true},
"10.5": {Ended: true},
"10.6": {Ended: true},
"10.7": {Ended: true},
"10.8": {Ended: true},
"10.9": {Ended: true},
"10.10": {Ended: true},
"10.11": {Ended: true},
"10.12": {Ended: true},
"10.13": {Ended: true},
"10.14": {Ended: true},
"10.15": {Ended: true},
}[majorDotMinor(release)]
case constant.MacOS, constant.MacOSServer:
eol, found = map[string]EOL{
"11": {Ended: true},
"12": {},
"13": {},
"14": {},
"15": {},
}[major(release)]
}
return
}
func major(osVer string) (majorVersion string) {
return strings.Split(osVer, ".")[0]
}
func majorDotMinor(osVer string) (majorDotMinor string) {
ss := strings.SplitN(osVer, ".", 3)
if len(ss) == 1 {
return osVer
}
return fmt.Sprintf("%s.%s", ss[0], ss[1])
}
func getAmazonLinuxVersion(osRelease string) string {
switch s := strings.Fields(osRelease)[0]; major(s) {
case "1":
return "1"
case "2":
return "2"
case "2022":
return "2022"
case "2023":
return "2023"
case "2027":
return "2027"
case "2029":
return "2029"
default:
if _, err := time.Parse("2006.01", s); err == nil {
return "1"
}
return "unknown"
}
}
================================================
FILE: config/os_test.go
================================================
package config
import (
"testing"
"time"
"github.com/future-architect/vuls/constant"
)
func TestEOL_IsStandardSupportEnded(t *testing.T) {
type fields struct {
family string
release string
}
tests := []struct {
name string
fields fields
now time.Time
found bool
stdEnded bool
extEnded bool
}{
// Amazon Linux
{
name: "amazon linux 1 supported",
fields: fields{family: constant.Amazon, release: "2018.03"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "amazon linux 1 eol on 2023-12-31",
fields: fields{family: constant.Amazon, release: "2018.03"},
now: time.Date(2024, 1, 1, 23, 59, 59, 0, time.UTC),
stdEnded: true,
extEnded: true,
found: true,
},
{
name: "amazon linux 2 supported",
fields: fields{family: constant.Amazon, release: "2 (Karoo)"},
now: time.Date(2023, 7, 1, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "amazon linux 2022 supported",
fields: fields{family: constant.Amazon, release: "2022 (Amazon Linux)"},
now: time.Date(2023, 7, 1, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "amazon linux 2023 supported",
fields: fields{family: constant.Amazon, release: "2023"},
now: time.Date(2023, 7, 1, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "amazon linux 2031 not found",
fields: fields{family: constant.Amazon, release: "2031"},
now: time.Date(2023, 7, 1, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: false,
},
//RHEL
{
name: "RHEL6 eol",
fields: fields{family: constant.RedHat, release: "6"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: true,
extEnded: false,
found: true,
},
{
name: "RHEL7 supported",
fields: fields{family: constant.RedHat, release: "7"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "RHEL8 supported",
fields: fields{family: constant.RedHat, release: "8"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "RHEL9 supported",
fields: fields{family: constant.RedHat, release: "9"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "RHEL10 supported",
fields: fields{family: constant.RedHat, release: "10"},
now: time.Date(2025, 5, 20, 0, 0, 0, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "RHEL11 not found",
fields: fields{family: constant.RedHat, release: "11"},
now: time.Date(2025, 5, 20, 0, 0, 0, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: false,
},
//CentOS
{
name: "CentOS 6 eol",
fields: fields{family: constant.CentOS, release: "6"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: true,
extEnded: true,
found: true,
},
{
name: "CentOS 7 supported",
fields: fields{family: constant.CentOS, release: "7"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "CentOS 8 supported",
fields: fields{family: constant.CentOS, release: "8"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "CentOS stream8 supported",
fields: fields{family: constant.CentOS, release: "stream8"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "CentOS stream9 supported",
fields: fields{family: constant.CentOS, release: "stream9"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "CentOS stream10 supported",
fields: fields{family: constant.CentOS, release: "stream10"},
now: time.Date(2030, 1, 1, 0, 0, 0, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "CentOS stream11 Not Found",
fields: fields{family: constant.CentOS, release: "stream11"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: false,
},
// Alma
{
name: "Alma Linux 8 supported",
fields: fields{family: constant.Alma, release: "8"},
now: time.Date(2021, 7, 2, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "Alma Linux 9 supported",
fields: fields{family: constant.Alma, release: "9"},
now: time.Date(2021, 7, 2, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "Alma Linux 10 supported",
fields: fields{family: constant.Alma, release: "10"},
now: time.Date(2035, 5, 31, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "Alma Linux 11 Not Found",
fields: fields{family: constant.Alma, release: "11"},
now: time.Date(2021, 7, 2, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: false,
},
// Rocky
{
name: "Rocky Linux 8 supported",
fields: fields{family: constant.Rocky, release: "8"},
now: time.Date(2021, 7, 2, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "Rocky Linux 9 supported",
fields: fields{family: constant.Rocky, release: "9"},
now: time.Date(2021, 7, 2, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "Rocky Linux 10 supported",
fields: fields{family: constant.Rocky, release: "10"},
now: time.Date(2035, 5, 31, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "Rocky Linux 11 Not Found",
fields: fields{family: constant.Rocky, release: "11"},
now: time.Date(2021, 7, 2, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: false,
},
//Oracle
{
name: "Oracle Linux 6 eol",
fields: fields{family: constant.Oracle, release: "6"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "Oracle Linux 7 supported",
fields: fields{family: constant.Oracle, release: "7"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
name: "Oracle Linux 8 supported",
fields: fields{family: constant.Oracle, release: "8"},
now: time.Date(2021, 1, 6, 23, 59, 59, 0, time.UTC),
stdEnded: false,
extEnded: false,
found: true,
},
{
gitextract_uolk7xgb/
├── .dockerignore
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── BUG_REPORT.md
│ │ ├── FEATURE_REQUEST.md
│ │ ├── SUPPORT_QUESTION.md
│ │ └── VULSREPO.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── build.yml
│ ├── codeql-analysis.yml
│ ├── diet-check.yml
│ ├── docker-publish.yml
│ ├── golangci.yml
│ ├── goreleaser.yml
│ ├── scorecard.yml
│ └── test.yml
├── .gitignore
├── .golangci.yml
├── .goreleaser.yml
├── CHANGELOG.md
├── Dockerfile
├── GNUmakefile
├── LICENSE
├── README.md
├── SECURITY.md
├── cache/
│ ├── bolt.go
│ ├── bolt_test.go
│ └── db.go
├── cmd/
│ ├── scanner/
│ │ └── main.go
│ └── vuls/
│ └── main.go
├── config/
│ ├── awsconf.go
│ ├── azureconf.go
│ ├── chatworkconf.go
│ ├── color.go
│ ├── config.go
│ ├── config_test.go
│ ├── config_v1.go
│ ├── googlechatconf.go
│ ├── httpconf.go
│ ├── jsonloader.go
│ ├── loader.go
│ ├── os.go
│ ├── os_test.go
│ ├── portscan.go
│ ├── portscan_test.go
│ ├── saasconf.go
│ ├── scanmode.go
│ ├── scanmodule.go
│ ├── scanmodule_test.go
│ ├── slackconf.go
│ ├── smtpconf.go
│ ├── syslog/
│ │ ├── syslogconf.go
│ │ ├── syslogconf_test.go
│ │ ├── syslogconf_windows.go
│ │ └── types.go
│ ├── telegramconf.go
│ ├── tomlloader.go
│ ├── tomlloader_test.go
│ ├── vulnDictConf.go
│ └── windows.go
├── constant/
│ └── constant.go
├── contrib/
│ ├── Dockerfile
│ ├── future-vuls/
│ │ ├── README.md
│ │ ├── cmd/
│ │ │ └── main.go
│ │ └── pkg/
│ │ ├── config/
│ │ │ └── config.go
│ │ ├── cpe/
│ │ │ └── cpe.go
│ │ ├── discover/
│ │ │ └── discover.go
│ │ └── fvuls/
│ │ ├── fvuls.go
│ │ └── model.go
│ ├── owasp-dependency-check/
│ │ └── parser/
│ │ └── parser.go
│ └── trivy/
│ ├── README.md
│ ├── cmd/
│ │ └── main.go
│ ├── parser/
│ │ ├── parser.go
│ │ └── v2/
│ │ ├── parser.go
│ │ └── parser_test.go
│ └── pkg/
│ ├── converter.go
│ ├── converter_test.go
│ └── export_test.go
├── cti/
│ └── cti.go
├── cwe/
│ ├── cwe.go
│ ├── en.go
│ ├── ja.go
│ ├── owasp.go
│ └── sans.go
├── detector/
│ ├── cti.go
│ ├── cve_client.go
│ ├── detector.go
│ ├── detector_test.go
│ ├── exploitdb.go
│ ├── exploitdb_test.go
│ ├── github.go
│ ├── javadb/
│ │ └── javadb.go
│ ├── kevuln.go
│ ├── library.go
│ ├── msf.go
│ ├── util.go
│ ├── vuls2/
│ │ ├── db.go
│ │ ├── db_test.go
│ │ ├── export_test.go
│ │ ├── vendor.go
│ │ ├── vuls2.go
│ │ └── vuls2_test.go
│ ├── wordpress.go
│ └── wordpress_test.go
├── errof/
│ └── errof.go
├── go.mod
├── go.sum
├── gost/
│ ├── gost.go
│ ├── microsoft.go
│ ├── microsoft_test.go
│ ├── pseudo.go
│ ├── redhat.go
│ ├── redhat_test.go
│ └── util.go
├── logging/
│ └── logutil.go
├── models/
│ ├── cvecontents.go
│ ├── cvecontents_test.go
│ ├── github.go
│ ├── library.go
│ ├── library_test.go
│ ├── models.go
│ ├── packages.go
│ ├── packages_test.go
│ ├── scanresults.go
│ ├── scanresults_test.go
│ ├── utils.go
│ ├── utils_test.go
│ ├── vulninfos.go
│ ├── vulninfos_test.go
│ └── wordpress.go
├── reporter/
│ ├── azureblob.go
│ ├── chatwork.go
│ ├── email.go
│ ├── googlechat.go
│ ├── http.go
│ ├── localfile.go
│ ├── s3.go
│ ├── sbom/
│ │ ├── cyclonedx.go
│ │ ├── cyclonedx_test.go
│ │ ├── purl.go
│ │ ├── purl_test.go
│ │ ├── spdx.go
│ │ └── spdx_test.go
│ ├── slack.go
│ ├── slack_test.go
│ ├── stdout.go
│ ├── syslog.go
│ ├── syslog_test.go
│ ├── telegram.go
│ ├── util.go
│ ├── util_test.go
│ └── writer.go
├── saas/
│ ├── saas.go
│ ├── uuid.go
│ └── uuid_test.go
├── scanner/
│ ├── alma.go
│ ├── alpine.go
│ ├── alpine_test.go
│ ├── amazon.go
│ ├── base.go
│ ├── base_test.go
│ ├── centos.go
│ ├── debian.go
│ ├── debian_test.go
│ ├── executil.go
│ ├── executil_test.go
│ ├── fedora.go
│ ├── freebsd.go
│ ├── freebsd_test.go
│ ├── library.go
│ ├── library_test.go
│ ├── macos.go
│ ├── macos_test.go
│ ├── oracle.go
│ ├── pseudo.go
│ ├── redhatbase.go
│ ├── redhatbase_test.go
│ ├── rhel.go
│ ├── rocky.go
│ ├── scanner.go
│ ├── scanner_test.go
│ ├── suse.go
│ ├── suse_test.go
│ ├── trivy/
│ │ └── jar/
│ │ ├── jar.go
│ │ └── parse.go
│ ├── unknownDistro.go
│ ├── utils/
│ │ └── filepath/
│ │ ├── unix/
│ │ │ └── unix.go
│ │ └── windows/
│ │ └── windows.go
│ ├── utils.go
│ ├── utils_test.go
│ ├── windows.go
│ └── windows_test.go
├── server/
│ └── server.go
├── setup/
│ └── docker/
│ └── README.md
├── subcmds/
│ ├── configtest.go
│ ├── discover.go
│ ├── history.go
│ ├── report.go
│ ├── report_windows.go
│ ├── saas.go
│ ├── scan.go
│ ├── server.go
│ ├── string_array_flag.go
│ ├── tui.go
│ └── util.go
├── tui/
│ └── tui.go
└── util/
├── util.go
└── util_test.go
SYMBOL INDEX (1641 symbols across 171 files)
FILE: cache/bolt.go
type Bolt (line 16) | type Bolt struct
method Close (line 44) | func (b Bolt) Close() error {
method createBucketIfNotExists (line 52) | func (b *Bolt) createBucketIfNotExists(name string) error {
method GetMeta (line 63) | func (b Bolt) GetMeta(serverName string) (meta Meta, found bool, err e...
method RefreshMeta (line 81) | func (b Bolt) RefreshMeta(meta Meta) error {
method EnsureBuckets (line 98) | func (b Bolt) EnsureBuckets(meta Meta) error {
method PrettyPrint (line 129) | func (b Bolt) PrettyPrint(meta Meta) error {
method GetChangelog (line 146) | func (b Bolt) GetChangelog(servername, packName string) (changelog str...
method PutChangelog (line 164) | func (b Bolt) PutChangelog(servername, packName, changelog string) err...
function SetupBolt (line 23) | func SetupBolt(path string, l logging.Logger) error {
FILE: cache/bolt_test.go
constant path (line 15) | path = "/tmp/vuls-test-cache-11111111.db"
constant servername (line 16) | servername = "server1"
function TestSetupBolt (line 32) | func TestSetupBolt(t *testing.T) {
function TestEnsureBuckets (line 59) | func TestEnsureBuckets(t *testing.T) {
function TestPutGetChangelog (line 99) | func TestPutGetChangelog(t *testing.T) {
FILE: cache/db.go
constant metabucket (line 13) | metabucket = "changelog-meta"
type Cache (line 16) | type Cache interface
type Meta (line 28) | type Meta struct
FILE: cmd/scanner/main.go
function main (line 15) | func main() {
FILE: cmd/vuls/main.go
function main (line 15) | func main() {
FILE: config/awsconf.go
type AWSConf (line 12) | type AWSConf struct
method Validate (line 50) | func (c *AWSConf) Validate() (errs []error) {
type CredentialProviderType (line 42) | type CredentialProviderType
constant CredentialProviderAnonymous (line 46) | CredentialProviderAnonymous CredentialProviderType = "anonymous"
FILE: config/azureconf.go
type AzureConf (line 11) | type AzureConf struct
method Validate (line 33) | func (c *AzureConf) Validate() (errs []error) {
constant azureAccount (line 28) | azureAccount = "AZURE_STORAGE_ACCOUNT"
constant azureKey (line 29) | azureKey = "AZURE_STORAGE_ACCESS_KEY"
FILE: config/chatworkconf.go
type ChatWorkConf (line 9) | type ChatWorkConf struct
method Validate (line 16) | func (c *ChatWorkConf) Validate() (errs []error) {
FILE: config/config.go
type Config (line 27) | type Config struct
method ValidateOnConfigtest (line 100) | func (c Config) ValidateOnConfigtest() bool {
method ValidateOnScan (line 112) | func (c Config) ValidateOnScan() bool {
method checkSSHKeyExist (line 143) | func (c Config) checkSSHKeyExist() (errs []error) {
method ValidateOnReport (line 159) | func (c *Config) ValidateOnReport() bool {
method ValidateOnSaaS (line 214) | func (c Config) ValidateOnSaaS() bool {
type ReportConf (line 65) | type ReportConf interface
type ScanOpts (line 70) | type ScanOpts struct
type ReportOpts (line 75) | type ReportOpts struct
type TrivyOpts (line 91) | type TrivyOpts struct
type WpScanConf (line 223) | type WpScanConf struct
type ServerInfo (line 229) | type ServerInfo struct
method GetServerName (line 305) | func (s ServerInfo) GetServerName() string {
method IsContainer (line 347) | func (s ServerInfo) IsContainer() bool {
method SetContainer (line 352) | func (s *ServerInfo) SetContainer(d Container) {
type ContainerSetting (line 277) | type ContainerSetting struct
type WordPressConf (line 285) | type WordPressConf struct
method IsZero (line 293) | func (cnf WordPressConf) IsZero() bool {
type GitHubConf (line 298) | type GitHubConf struct
type Distro (line 313) | type Distro struct
method String (line 318) | func (l Distro) String() string {
method MajorVersion (line 323) | func (l Distro) MajorVersion() (int, error) {
type Container (line 357) | type Container struct
FILE: config/config_test.go
function TestDistro_MajorVersion (line 9) | func TestDistro_MajorVersion(t *testing.T) {
FILE: config/config_v1.go
type V1 (line 18) | type V1 struct
type Server (line 25) | type Server struct
constant WinUpdateSrcVulsDefault (line 35) | WinUpdateSrcVulsDefault = 2
constant SystemDefault (line 39) | SystemDefault = 0
constant WSUS (line 40) | WSUS = 1
constant WinUpdateDirect (line 41) | WinUpdateDirect = 2
constant LocalCab (line 42) | LocalCab = 3
type ProxyConfig (line 46) | type ProxyConfig struct
function convertToLatestConfig (line 56) | func convertToLatestConfig(pathToToml string) error {
FILE: config/googlechatconf.go
type GoogleChatConf (line 9) | type GoogleChatConf struct
method Validate (line 17) | func (c *GoogleChatConf) Validate() (errs []error) {
FILE: config/httpconf.go
type HTTPConf (line 10) | type HTTPConf struct
method Validate (line 18) | func (c *HTTPConf) Validate() (errs []error) {
constant httpKey (line 15) | httpKey = "VULS_HTTP_URL"
FILE: config/jsonloader.go
type JSONLoader (line 6) | type JSONLoader struct
method Load (line 10) | func (c JSONLoader) Load(_, _, _ string) (err error) {
FILE: config/loader.go
function Load (line 4) | func Load(path string) error {
type Loader (line 10) | type Loader interface
FILE: config/os.go
type EOL (line 12) | type EOL struct
method IsStandardSupportEnded (line 19) | func (e EOL) IsStandardSupportEnded(now time.Time) bool {
method IsExtendedSuppportEnded (line 26) | func (e EOL) IsExtendedSuppportEnded(now time.Time) bool {
function GetEOL (line 39) | func GetEOL(family, release string) (eol EOL, found bool) {
function major (line 489) | func major(osVer string) (majorVersion string) {
function majorDotMinor (line 493) | func majorDotMinor(osVer string) (majorDotMinor string) {
function getAmazonLinuxVersion (line 501) | func getAmazonLinuxVersion(osRelease string) string {
FILE: config/os_test.go
function TestEOL_IsStandardSupportEnded (line 10) | func TestEOL_IsStandardSupportEnded(t *testing.T) {
function Test_majorDotMinor (line 901) | func Test_majorDotMinor(t *testing.T) {
function Test_getAmazonLinuxVersion (line 948) | func Test_getAmazonLinuxVersion(t *testing.T) {
FILE: config/portscan.go
type PortScanConf (line 15) | type PortScanConf struct
method GetScanTechniques (line 90) | func (c *PortScanConf) GetScanTechniques() []ScanTechnique {
method Validate (line 118) | func (c *PortScanConf) Validate() (errs []error) {
method IsZero (line 212) | func (c PortScanConf) IsZero() bool {
type ScanTechnique (line 32) | type ScanTechnique
method String (line 66) | func (s ScanTechnique) String() string {
constant NotSupportTechnique (line 36) | NotSupportTechnique ScanTechnique = iota
constant TCPSYN (line 38) | TCPSYN
constant TCPConnect (line 40) | TCPConnect
constant TCPACK (line 42) | TCPACK
constant TCPWindow (line 44) | TCPWindow
constant TCPMaimon (line 46) | TCPMaimon
constant TCPNull (line 48) | TCPNull
constant TCPFIN (line 50) | TCPFIN
constant TCPXmas (line 52) | TCPXmas
FILE: config/portscan_test.go
function TestPortScanConf_getScanTechniques (line 8) | func TestPortScanConf_getScanTechniques(t *testing.T) {
function TestPortScanConf_IsZero (line 45) | func TestPortScanConf_IsZero(t *testing.T) {
FILE: config/saasconf.go
type SaasConf (line 9) | type SaasConf struct
method Validate (line 16) | func (c *SaasConf) Validate() (errs []error) {
FILE: config/scanmode.go
type ScanMode (line 10) | type ScanMode struct
method Set (line 31) | func (s *ScanMode) Set(f byte) {
method IsFast (line 36) | func (s ScanMode) IsFast() bool {
method IsFastRoot (line 41) | func (s ScanMode) IsFastRoot() bool {
method IsDeep (line 46) | func (s ScanMode) IsDeep() bool {
method IsOffline (line 51) | func (s ScanMode) IsOffline() bool {
method ensure (line 55) | func (s *ScanMode) ensure() error {
method String (line 72) | func (s ScanMode) String() string {
constant Fast (line 16) | Fast = byte(1 << iota)
constant FastRoot (line 18) | FastRoot
constant Deep (line 20) | Deep
constant Offline (line 22) | Offline
constant fastStr (line 24) | fastStr = "fast"
constant fastRootStr (line 25) | fastRootStr = "fast-root"
constant deepStr (line 26) | deepStr = "deep"
constant offlineStr (line 27) | offlineStr = "offline"
function setScanMode (line 87) | func setScanMode(server *ServerInfo) error {
FILE: config/scanmodule.go
type ScanModule (line 10) | type ScanModule struct
method Set (line 33) | func (s *ScanModule) Set(f byte) {
method IsScanOSPkg (line 38) | func (s ScanModule) IsScanOSPkg() bool {
method IsScanWordPress (line 43) | func (s ScanModule) IsScanWordPress() bool {
method IsScanLockFile (line 48) | func (s ScanModule) IsScanLockFile() bool {
method IsScanPort (line 53) | func (s ScanModule) IsScanPort() bool {
method IsZero (line 58) | func (s ScanModule) IsZero() bool {
method ensure (line 62) | func (s *ScanModule) ensure() error {
constant OSPkg (line 16) | OSPkg = byte(1 << iota)
constant WordPress (line 18) | WordPress
constant Lockfile (line 20) | Lockfile
constant Port (line 22) | Port
constant osPkgStr (line 24) | osPkgStr = "ospkg"
constant wordPressStr (line 25) | wordPressStr = "wordpress"
constant lockfileStr (line 26) | lockfileStr = "lockfile"
constant portStr (line 27) | portStr = "port"
function setScanModules (line 74) | func setScanModules(server *ServerInfo, d ServerInfo) error {
FILE: config/scanmodule_test.go
function TestScanModule_IsZero (line 7) | func TestScanModule_IsZero(t *testing.T) {
function TestScanModule_validate (line 37) | func TestScanModule_validate(t *testing.T) {
FILE: config/slackconf.go
type SlackConf (line 11) | type SlackConf struct
method Validate (line 23) | func (c *SlackConf) Validate() (errs []error) {
FILE: config/smtpconf.go
type SMTPConf (line 9) | type SMTPConf struct
method Validate (line 36) | func (c *SMTPConf) Validate() (errs []error) {
function checkEmails (line 23) | func checkEmails(emails []string) (errs []error) {
FILE: config/syslog/syslogconf.go
method Validate (line 14) | func (c *Conf) Validate() (errs []error) {
method GetSeverity (line 43) | func (c *Conf) GetSeverity() (syslog.Priority, error) {
method GetFacility (line 71) | func (c *Conf) GetFacility() (syslog.Priority, error) {
FILE: config/syslog/syslogconf_test.go
function TestSyslogConfValidate (line 9) | func TestSyslogConfValidate(t *testing.T) {
FILE: config/syslog/syslogconf_windows.go
method Validate (line 8) | func (c *Conf) Validate() (errs []error) {
FILE: config/syslog/types.go
type Conf (line 4) | type Conf struct
FILE: config/telegramconf.go
type TelegramConf (line 9) | type TelegramConf struct
method Validate (line 16) | func (c *TelegramConf) Validate() (errs []error) {
FILE: config/tomlloader.go
type TOMLLoader (line 22) | type TOMLLoader struct
method Load (line 26) | func (c TOMLLoader) Load(pathToToml string) error {
function hosts (line 161) | func hosts(host string, ignores []string) ([]string, error) {
function enumerateHosts (line 191) | func enumerateHosts(host string) ([]string, error) {
function isCIDRNotation (line 220) | func isCIDRNotation(host string) bool {
function setDefaultIfEmpty (line 228) | func setDefaultIfEmpty(server *ServerInfo) error {
function toCpeURI (line 313) | func toCpeURI(cpename string) (string, error) {
FILE: config/tomlloader_test.go
function TestHosts (line 9) | func TestHosts(t *testing.T) {
function TestToCpeURI (line 100) | func TestToCpeURI(t *testing.T) {
FILE: config/vulnDictConf.go
type VulnDictInterface (line 16) | type VulnDictInterface interface
type VulnDict (line 29) | type VulnDict struct
method GetType (line 51) | func (cnf VulnDict) GetType() string {
method GetName (line 56) | func (cnf VulnDict) GetName() string {
method GetURL (line 61) | func (cnf VulnDict) GetURL() string {
method GetSQLite3Path (line 66) | func (cnf VulnDict) GetSQLite3Path() string {
method GetDebugSQL (line 71) | func (cnf VulnDict) GetDebugSQL() bool {
method Validate (line 76) | func (cnf VulnDict) Validate() error {
method Init (line 116) | func (cnf VulnDict) Init() {}
method setDefault (line 118) | func (cnf *VulnDict) setDefault(sqlite3Name string) {
method IsFetchViaHTTP (line 129) | func (cnf VulnDict) IsFetchViaHTTP() bool {
method CheckHTTPHealth (line 134) | func (cnf VulnDict) CheckHTTPHealth() error {
type ExploitConf (line 150) | type ExploitConf struct
method Init (line 161) | func (cnf *ExploitConf) Init() {
constant exploitDBType (line 154) | exploitDBType = "EXPLOITDB_TYPE"
constant exploitDBURL (line 155) | exploitDBURL = "EXPLOITDB_URL"
constant exploitDBPATH (line 156) | exploitDBPATH = "EXPLOITDB_SQLITE3_PATH"
type GoCveDictConf (line 177) | type GoCveDictConf struct
method Init (line 188) | func (cnf *GoCveDictConf) Init() {
constant cveDBType (line 181) | cveDBType = "CVEDB_TYPE"
constant cveDBURL (line 182) | cveDBURL = "CVEDB_URL"
constant cveDBPATH (line 183) | cveDBPATH = "CVEDB_SQLITE3_PATH"
type GostConf (line 204) | type GostConf struct
method Init (line 215) | func (cnf *GostConf) Init() {
constant gostDBType (line 208) | gostDBType = "GOSTDB_TYPE"
constant gostDBURL (line 209) | gostDBURL = "GOSTDB_URL"
constant gostDBPATH (line 210) | gostDBPATH = "GOSTDB_SQLITE3_PATH"
type MetasploitConf (line 231) | type MetasploitConf struct
method Init (line 242) | func (cnf *MetasploitConf) Init() {
constant metasploitDBType (line 235) | metasploitDBType = "METASPLOITDB_TYPE"
constant metasploitDBURL (line 236) | metasploitDBURL = "METASPLOITDB_URL"
constant metasploitDBPATH (line 237) | metasploitDBPATH = "METASPLOITDB_SQLITE3_PATH"
type KEVulnConf (line 258) | type KEVulnConf struct
method Init (line 269) | func (cnf *KEVulnConf) Init() {
constant kevulnDBType (line 262) | kevulnDBType = "KEVULN_TYPE"
constant kevulnDBURL (line 263) | kevulnDBURL = "KEVULN_URL"
constant kevulnDBPATH (line 264) | kevulnDBPATH = "KEVULN_SQLITE3_PATH"
type CtiConf (line 285) | type CtiConf struct
method Init (line 296) | func (cnf *CtiConf) Init() {
constant ctiDBType (line 289) | ctiDBType = "CTI_TYPE"
constant ctiDBURL (line 290) | ctiDBURL = "CTI_URL"
constant ctiDBPATH (line 291) | ctiDBPATH = "CTI_SQLITE3_PATH"
type Vuls2Conf (line 312) | type Vuls2Conf struct
FILE: config/windows.go
type WindowsConf (line 8) | type WindowsConf struct
method Validate (line 14) | func (c *WindowsConf) Validate() []error {
FILE: constant/constant.go
constant RedHat (line 9) | RedHat = "redhat"
constant Debian (line 12) | Debian = "debian"
constant Ubuntu (line 15) | Ubuntu = "ubuntu"
constant CentOS (line 18) | CentOS = "centos"
constant Alma (line 21) | Alma = "alma"
constant Rocky (line 24) | Rocky = "rocky"
constant Fedora (line 27) | Fedora = "fedora"
constant Amazon (line 30) | Amazon = "amazon"
constant Oracle (line 33) | Oracle = "oracle"
constant FreeBSD (line 36) | FreeBSD = "freebsd"
constant Raspbian (line 39) | Raspbian = "raspbian"
constant Windows (line 42) | Windows = "windows"
constant MacOSX (line 45) | MacOSX = "macos_x"
constant MacOSXServer (line 48) | MacOSXServer = "macos_x_server"
constant MacOS (line 51) | MacOS = "macos"
constant MacOSServer (line 54) | MacOSServer = "macos_server"
constant OpenSUSE (line 57) | OpenSUSE = "opensuse"
constant OpenSUSELeap (line 60) | OpenSUSELeap = "opensuse.leap"
constant SUSEEnterpriseServer (line 63) | SUSEEnterpriseServer = "suse.linux.enterprise.server"
constant SUSEEnterpriseDesktop (line 66) | SUSEEnterpriseDesktop = "suse.linux.enterprise.desktop"
constant Alpine (line 69) | Alpine = "alpine"
constant ServerTypePseudo (line 72) | ServerTypePseudo = "pseudo"
constant DeepSecurity (line 75) | DeepSecurity = "deepsecurity"
FILE: contrib/future-vuls/cmd/main.go
function main (line 41) | func main() {
FILE: contrib/future-vuls/pkg/config/config.go
constant DiscoverTomlFileName (line 6) | DiscoverTomlFileName = "discover_list.toml"
constant SnmpVersion (line 8) | SnmpVersion = "v2c"
constant FvulsDomain (line 10) | FvulsDomain = "vuls.biz"
constant Community (line 12) | Community = "public"
constant DiscoverTomlTimeStampFormat (line 14) | DiscoverTomlTimeStampFormat = "20060102150405"
type DiscoverToml (line 18) | type DiscoverToml
type ServerSetting (line 21) | type ServerSetting struct
FILE: contrib/future-vuls/pkg/cpe/cpe.go
type AddCpeConfig (line 19) | type AddCpeConfig struct
method LoadAndCheckTomlFile (line 69) | func (c *AddCpeConfig) LoadAndCheckTomlFile(ctx context.Context) (need...
method AddServerToFvuls (line 127) | func (c *AddCpeConfig) AddServerToFvuls(ctx context.Context, needAddSe...
method AddCpeToFvuls (line 147) | func (c *AddCpeConfig) AddCpeToFvuls(ctx context.Context, needAddCpes ...
method WriteDiscoverToml (line 170) | func (c *AddCpeConfig) WriteDiscoverToml() error {
function AddCpe (line 27) | func AddCpe(token, outputFile, proxy string) (err error) {
FILE: contrib/future-vuls/pkg/discover/discover.go
function ActiveHosts (line 19) | func ActiveHosts(cidr, outputFile, snmpVersion, community string, timeou...
function executeSnmp2cpe (line 109) | func executeSnmp2cpe(addr, snmpVersion, community string, timeout time.D...
FILE: contrib/future-vuls/pkg/fvuls/fvuls.go
type Client (line 21) | type Client struct
method UploadToFvuls (line 43) | func (f Client) UploadToFvuls(serverUUID string, groupID int64, tags [...
method GetServerByUUID (line 78) | func (f Client) GetServerByUUID(ctx context.Context, uuid string) (ser...
method CreatePseudoServer (line 98) | func (f Client) CreatePseudoServer(ctx context.Context, name string) (...
method UploadCPE (line 124) | func (f Client) UploadCPE(ctx context.Context, cpeURI string, serverID...
method ListUploadedCPE (line 153) | func (f Client) ListUploadedCPE(ctx context.Context, serverID int64) (...
method sendHTTPRequest (line 183) | func (f Client) sendHTTPRequest(req *http.Request) ([]byte, error) {
function NewClient (line 29) | func NewClient(token string, proxy string) *Client {
FILE: contrib/future-vuls/pkg/fvuls/model.go
type CreatePseudoServerInput (line 5) | type CreatePseudoServerInput struct
type AddCpeInput (line 10) | type AddCpeInput struct
type AddCpeOutput (line 17) | type AddCpeOutput struct
type ListCpesInput (line 22) | type ListCpesInput struct
type ListCpesOutput (line 29) | type ListCpesOutput struct
type Paging (line 35) | type Paging struct
type PkgCpes (line 42) | type PkgCpes struct
type ServerChild (line 47) | type ServerChild struct
type ServerDetailOutput (line 52) | type ServerDetailOutput struct
FILE: contrib/owasp-dependency-check/parser/parser.go
type analysis (line 15) | type analysis struct
type dependency (line 19) | type dependency struct
type vulnerabilityID (line 23) | type vulnerabilityID struct
function appendIfMissing (line 27) | func appendIfMissing(slice []string, str string) []string {
function Parse (line 35) | func Parse(path string) ([]string, error) {
FILE: contrib/trivy/cmd/main.go
function main (line 23) | func main() {
FILE: contrib/trivy/parser/parser.go
type Parser (line 13) | type Parser interface
type Report (line 18) | type Report struct
function NewParser (line 23) | func NewParser(vulnJSON []byte) (Parser, error) {
FILE: contrib/trivy/parser/v2/parser.go
type ParserV2 (line 17) | type ParserV2 struct
method Parse (line 21) | func (p ParserV2) Parse(vulnJSON []byte) (result *models.ScanResult, e...
function setScanResultMeta (line 40) | func setScanResultMeta(scanResult *models.ScanResult, report *types.Repo...
FILE: contrib/trivy/parser/v2/parser_test.go
function TestParse (line 13) | func TestParse(t *testing.T) {
function TestParseError (line 3122) | func TestParseError(t *testing.T) {
FILE: contrib/trivy/pkg/converter.go
function Convert (line 20) | func Convert(results types.Results, artifactType ftypes.ArtifactType, ar...
function isTrivySupportedOS (line 261) | func isTrivySupportedOS(family ftypes.TargetType) bool {
function getPURL (line 292) | func getPURL(p ftypes.Package) string {
function getLockfilePath (line 299) | func getLockfilePath(scanmode ftypes.ArtifactType, artifactName string, ...
FILE: contrib/trivy/pkg/converter_test.go
function Test_getLockfilePath (line 10) | func Test_getLockfilePath(t *testing.T) {
FILE: cti/cti.go
type Technique (line 4) | type Technique struct
FILE: cwe/en.go
type Cwe (line 4) | type Cwe struct
FILE: detector/cti.go
type goCTIDBClient (line 24) | type goCTIDBClient struct
method closeDB (line 30) | func (client goCTIDBClient) closeDB() error {
function newGoCTIDBClient (line 37) | func newGoCTIDBClient(cnf config.VulnDictInterface, o logging.LogOpts) (...
function FillWithCTI (line 50) | func FillWithCTI(r *models.ScanResult, cnf config.CtiConf, logOpts loggi...
type ctiResponse (line 109) | type ctiResponse struct
function getCTIsViaHTTP (line 114) | func getCTIsViaHTTP(cveIDs []string, urlPrefix string) (responses []ctiR...
type ctiRequest (line 170) | type ctiRequest struct
function httpGetCTI (line 174) | func httpGetCTI(url string, req ctiRequest, resChan chan<- ctiResponse, ...
function newCTIDB (line 212) | func newCTIDB(cnf config.VulnDictInterface) (ctidb.DB, error) {
FILE: detector/cve_client.go
type goCveDictClient (line 24) | type goCveDictClient struct
method closeDB (line 41) | func (client goCveDictClient) closeDB() error {
method fetchCveDetails (line 53) | func (client goCveDictClient) fetchCveDetails(cveIDs []string) (cveDet...
method detectCveByCpeURI (line 149) | func (client goCveDictClient) detectCveByCpeURI(cpeURI string, useJVN ...
function newGoCveDictClient (line 29) | func newGoCveDictClient(cnf config.VulnDictInterface, o logging.LogOpts)...
type response (line 48) | type response struct
function httpGet (line 114) | func httpGet(key, url string, resChan chan<- response, errChan chan<- er...
function httpPost (line 182) | func httpPost(url string, query map[string]string) ([]cvemodels.CveDetai...
function newCveDB (line 216) | func newCveDB(cnf config.VulnDictInterface) (cvedb.DB, error) {
FILE: detector/detector.go
type Cpe (line 29) | type Cpe struct
function Detect (line 35) | func Detect(rs []models.ScanResult, dir string) ([]models.ScanResult, er...
function DetectPkgCves (line 320) | func DetectPkgCves(r *models.ScanResult, gostCnf config.GostConf, vuls2C...
function isPkgCvesDetactable (line 369) | func isPkgCvesDetactable(r *models.ScanResult) bool {
function DetectGitHubCves (line 396) | func DetectGitHubCves(r *models.ScanResult, githubConfs map[string]confi...
function DetectWordPressCves (line 423) | func DetectWordPressCves(r *models.ScanResult, wpCnf config.WpScanConf) ...
function FillCvesWithGoCVEDictionary (line 437) | func FillCvesWithGoCVEDictionary(r *models.ScanResult, cnf config.GoCveD...
function fillCertAlerts (line 507) | func fillCertAlerts(cvedetail *cvemodels.CveDetail) (dict models.AlertDi...
function detectPkgsCvesWithGost (line 531) | func detectPkgsCvesWithGost(cnf config.GostConf, r *models.ScanResult, l...
function DetectCpeURIsCves (line 553) | func DetectCpeURIsCves(r *models.ScanResult, cpes []Cpe, cnf config.GoCv...
function getMaxConfidence (line 659) | func getMaxConfidence(detail cvemodels.CveDetail) (maxConfidence models....
function FillCweDict (line 763) | func FillCweDict(r *models.ScanResult) {
function fillCweRank (line 808) | func fillCweRank(entry *models.CweDictEntry, id string) {
FILE: detector/detector_test.go
function Test_getMaxConfidence (line 14) | func Test_getMaxConfidence(t *testing.T) {
function TestFillCweDict (line 138) | func TestFillCweDict(t *testing.T) {
FILE: detector/exploitdb.go
type goExploitDBClient (line 25) | type goExploitDBClient struct
method closeDB (line 31) | func (client goExploitDBClient) closeDB() error {
function newGoExploitDBClient (line 38) | func newGoExploitDBClient(cnf config.VulnDictInterface, o logging.LogOpt...
function FillWithExploit (line 51) | func FillWithExploit(r *models.ScanResult, cnf config.ExploitConf, logOp...
function ConvertToModelsExploit (line 110) | func ConvertToModelsExploit(es []exploitmodels.Exploit) (exploits []mode...
type exploitResponse (line 138) | type exploitResponse struct
function getExploitsViaHTTP (line 143) | func getExploitsViaHTTP(cveIDs []string, urlPrefix string) (
type exploitRequest (line 200) | type exploitRequest struct
function httpGetExploit (line 204) | func httpGetExploit(url string, req exploitRequest, resChan chan<- explo...
function newExploitDB (line 243) | func newExploitDB(cnf config.VulnDictInterface) (exploitdb.DB, error) {
FILE: detector/exploitdb_test.go
function TestConvertToModelsExploit (line 14) | func TestConvertToModelsExploit(t *testing.T) {
FILE: detector/github.go
function DetectGitHubSecurityAlerts (line 24) | func DetectGitHubSecurityAlerts(r *models.ScanResult, owner, repo, token...
type SecurityAlerts (line 158) | type SecurityAlerts struct
function DetectGitHubDependencyGraph (line 214) | func DetectGitHubDependencyGraph(r *models.ScanResult, owner, repo, toke...
function fetchDependencyGraph (line 225) | func fetchDependencyGraph(r *models.ScanResult, httpClient *http.Client,...
type DependencyGraph (line 344) | type DependencyGraph struct
FILE: detector/javadb/javadb.go
function UpdateJavaDB (line 31) | func UpdateJavaDB(trivyOpts config.TrivyOpts, noProgress bool) error {
function isNewDB (line 109) | func isNewDB(meta db.Metadata) bool {
type DBClient (line 124) | type DBClient struct
method Close (line 138) | func (client *DBClient) Close() error {
method SearchBySHA1 (line 147) | func (client *DBClient) SearchBySHA1(sha1 string) (jar.Properties, err...
function NewClient (line 129) | func NewClient(cacheDBDir string) (*DBClient, error) {
FILE: detector/kevuln.go
type goKEVulnDBClient (line 24) | type goKEVulnDBClient struct
method closeDB (line 30) | func (client goKEVulnDBClient) closeDB() error {
function newGoKEVulnDBClient (line 37) | func newGoKEVulnDBClient(cnf config.VulnDictInterface, o logging.LogOpts...
function FillWithKEVuln (line 50) | func FillWithKEVuln(r *models.ScanResult, cnf config.KEVulnConf, logOpts...
type kevulnResponse (line 238) | type kevulnResponse struct
function getKEVulnsViaHTTP (line 243) | func getKEVulnsViaHTTP(cveIDs []string, urlPrefix string) (
type kevulnRequest (line 300) | type kevulnRequest struct
function httpGetKEVuln (line 304) | func httpGetKEVuln(url string, req kevulnRequest, resChan chan<- kevulnR...
function newKEVulnDB (line 343) | func newKEVulnDB(cnf config.VulnDictInterface) (kevulndb.DB, error) {
FILE: detector/library.go
type libraryDetector (line 36) | type libraryDetector struct
method scan (line 167) | func (d *libraryDetector) scan() ([]models.VulnInfo, error) {
method improveJARInfo (line 198) | func (d *libraryDetector) improveJARInfo() error {
method convertFanalToVuln (line 237) | func (d libraryDetector) convertFanalToVuln(tvulns []types.DetectedVul...
method getVulnDetail (line 249) | func (d libraryDetector) getVulnDetail(tvuln types.DetectedVulnerabili...
function DetectLibsCves (line 43) | func DetectLibsCves(r *models.ScanResult, trivyOpts config.TrivyOpts, lo...
function downloadDB (line 105) | func downloadDB(appVersion string, trivyOpts config.TrivyOpts, noProgres...
function showDBInfo (line 155) | func showDBInfo(cacheDir string) error {
function getCveContents (line 269) | func getCveContents(cveID string, vul trivydbTypes.Vulnerability) (conte...
FILE: detector/msf.go
type goMetasploitDBClient (line 25) | type goMetasploitDBClient struct
method closeDB (line 31) | func (client goMetasploitDBClient) closeDB() error {
function newGoMetasploitDBClient (line 38) | func newGoMetasploitDBClient(cnf config.VulnDictInterface, o logging.Log...
function FillWithMetasploit (line 51) | func FillWithMetasploit(r *models.ScanResult, cnf config.MetasploitConf,...
type metasploitResponse (line 109) | type metasploitResponse struct
function getMetasploitsViaHTTP (line 114) | func getMetasploitsViaHTTP(cveIDs []string, urlPrefix string) (
type metasploitRequest (line 171) | type metasploitRequest struct
function httpGetMetasploit (line 175) | func httpGetMetasploit(url string, req metasploitRequest, resChan chan<-...
function ConvertToModelsMsf (line 215) | func ConvertToModelsMsf(ms []metasploitmodels.Metasploit) (modules []mod...
function newMetasploitDB (line 234) | func newMetasploitDB(cnf config.VulnDictInterface) (metasploitdb.DB, err...
FILE: detector/util.go
function reuseScannedCves (line 23) | func reuseScannedCves(r *models.ScanResult) bool {
function needToRefreshCve (line 31) | func needToRefreshCve(r models.ScanResult) bool {
function loadPrevious (line 40) | func loadPrevious(currs models.ScanResults, resultsDir string) (prevs mo...
function diff (line 70) | func diff(curResults, preResults models.ScanResults, isPlus, isMinus boo...
function getPlusDiffCves (line 119) | func getPlusDiffCves(previous, current models.ScanResult) models.VulnInf...
function getMinusDiffCves (line 159) | func getMinusDiffCves(previous, current models.ScanResult) models.VulnIn...
function isCveInfoUpdated (line 180) | func isCveInfoUpdated(cveID string, previous, current models.ScanResult)...
function ListValidJSONDirs (line 221) | func ListValidJSONDirs(resultsDir string) (dirs []string, err error) {
function loadOneServerScanResult (line 243) | func loadOneServerScanResult(jsonFile string) (*models.ScanResult, error) {
function ValidateDBs (line 266) | func ValidateDBs(cveConf config.GoCveDictConf, gostConf config.GostConf,...
FILE: detector/vuls2/db.go
function newDBConfig (line 27) | func newDBConfig(vuls2Conf config.Vuls2Conf, noProgress bool) (*session....
function shouldDownload (line 77) | func shouldDownload(vuls2Conf config.Vuls2Conf, now time.Time) (bool, er...
FILE: detector/vuls2/db_test.go
function Test_shouldDownload (line 17) | func Test_shouldDownload(t *testing.T) {
function putMetadata (line 153) | func putMetadata(metadata types.Metadata, path string) error {
function parse (line 175) | func parse(date string) *time.Time {
function schemaVersionBoltDB (line 180) | func schemaVersionBoltDB(t *testing.T) uint {
FILE: detector/vuls2/export_test.go
type Source (line 11) | type Source
FILE: detector/vuls2/vendor.go
function preConvertBinaryVersion (line 33) | func preConvertBinaryVersion(family, version string) string {
function toVuls2Family (line 48) | func toVuls2Family(vuls0Family, vuls0Release string) string {
function toVuls2Release (line 66) | func toVuls2Release(vuls0Family, vuls0Release string) string {
function ignoreVulnerability (line 80) | func ignoreVulnerability(e ecosystemTypes.Ecosystem, v vulnerabilityType...
function filterDistroAdvisories (line 117) | func filterDistroAdvisories(e ecosystemTypes.Ecosystem, as models.Distro...
function ignoreCriteria (line 135) | func ignoreCriteria(e ecosystemTypes.Ecosystem, s sourceTypes.SourceID, ...
function ignoreCriterion (line 169) | func ignoreCriterion(e ecosystemTypes.Ecosystem, cn criterionTypes.Filte...
function filterCriterion (line 220) | func filterCriterion(e ecosystemTypes.Ecosystem, scanned scanTypes.ScanR...
function affectedPackageName (line 341) | func affectedPackageName(e ecosystemTypes.Ecosystem, pkg scanTypes.OSPac...
function fixState (line 350) | func fixState(e ecosystemTypes.Ecosystem, s sourceTypes.SourceID, fixsta...
function selectFixedIn (line 367) | func selectFixedIn(rangeType vcAffectedRangeTypes.RangeType, fixed []str...
function comparePackStatus (line 412) | func comparePackStatus(a, b packStatus) (int, error) {
function advisoryReference (line 473) | func advisoryReference(e ecosystemTypes.Ecosystem, s sourceTypes.SourceI...
function cveContentSourceLink (line 585) | func cveContentSourceLink(ccType models.CveContentType, v vulnerabilityT...
function compareSource (line 608) | func compareSource(a, b source) int {
function compareSourceID (line 630) | func compareSourceID(e ecosystemTypes.Ecosystem, a, b sourceTypes.Source...
function compareTag (line 739) | func compareTag(e ecosystemTypes.Ecosystem, s sourceTypes.SourceID, a, b...
function toCveContentType (line 794) | func toCveContentType(e ecosystemTypes.Ecosystem, s sourceTypes.SourceID...
function toCvss (line 836) | func toCvss(e ecosystemTypes.Ecosystem, src sourceTypes.SourceID, ss []s...
function toVuls0Confidence (line 935) | func toVuls0Confidence(e ecosystemTypes.Ecosystem, s sourceTypes.SourceI...
FILE: detector/vuls2/vuls2.go
constant defaultRegistory (line 44) | defaultRegistory = "ghcr.io/vulsio/vuls-nightly-db"
function Detect (line 47) | func Detect(r *models.ScanResult, vuls2Conf config.Vuls2Conf, noProgress...
function preConvert (line 119) | func preConvert(sr *models.ScanResult) scanTypes.ScanResult {
function detect (line 166) | func detect(sesh *session.Session, sr scanTypes.ScanResult) (detectTypes...
type source (line 246) | type source struct
type sourceData (line 252) | type sourceData struct
type rootTag (line 259) | type rootTag struct
type pack (line 264) | type pack struct
type packStatus (line 272) | type packStatus struct
function postConvert (line 277) | func postConvert(scanned scanTypes.ScanResult, detected detectTypes.Dete...
function walkVulnerabilityDetections (line 429) | func walkVulnerabilityDetections(m map[source]sourceData, scanned scanTy...
function pruneCriteria (line 466) | func pruneCriteria(c criteriaTypes.FilteredCriteria) (criteriaTypes.Filt...
function walkCriteria (line 526) | func walkCriteria(e ecosystemTypes.Ecosystem, sourceID sourceTypes.Sourc...
function walkVulnerabilityDatas (line 613) | func walkVulnerabilityDatas(m map[source]sourceData, vds []detectTypes.V...
function comparePack (line 814) | func comparePack(a, b pack) (int, error) {
function mergeVulnInfo (line 840) | func mergeVulnInfo(a, b models.VulnInfo) (models.VulnInfo, error) {
function toReference (line 1004) | func toReference(ref string) models.Reference {
FILE: detector/vuls2/vuls2_test.go
function Test_preConvert (line 47) | func Test_preConvert(t *testing.T) {
type args (line 280) | type args struct
FILE: detector/wordpress.go
type wpCveInfos (line 25) | type wpCveInfos struct
type wpCveInfo (line 37) | type wpCveInfo struct
type references (line 55) | type references struct
type cvss (line 63) | type cvss struct
type closed (line 70) | type closed struct
function detectWordPressCves (line 76) | func detectWordPressCves(r *models.ScanResult, cnf config.WpScanConf) (i...
function wpscan (line 135) | func wpscan(url, name, token string, isCore bool) (vinfos []models.VulnI...
function detect (line 149) | func detect(installed models.WpPackage, candidates []models.VulnInfo) (v...
function match (line 172) | func match(installedVer, fixedIn string) (bool, error) {
function convertToVinfos (line 184) | func convertToVinfos(pkgName, body string) (vinfos []models.VulnInfo, er...
function extractToVulnInfos (line 201) | func extractToVulnInfos(pkgName string, cves []wpCveInfo) (vinfos []mode...
function httpRequest (line 290) | func httpRequest(url, token string) (string, error) {
function removeInactives (line 329) | func removeInactives(pkgs models.WordPressPackages) (removed models.Word...
FILE: detector/wordpress_test.go
function TestRemoveInactive (line 13) | func TestRemoveInactive(t *testing.T) {
function Test_convertToVinfos (line 87) | func Test_convertToVinfos(t *testing.T) {
FILE: errof/errof.go
type ErrorCode (line 4) | type ErrorCode
type Error (line 7) | type Error struct
method Error (line 12) | func (e Error) Error() string {
function New (line 28) | func New(code ErrorCode, msg string) Error {
FILE: gost/gost.go
type Client (line 19) | type Client interface
type Base (line 25) | type Base struct
method CloseDB (line 31) | func (b Base) CloseDB() error {
function FillCVEsWithRedHat (line 39) | func FillCVEsWithRedHat(r *models.ScanResult, cnf config.GostConf, o log...
function NewGostClient (line 59) | func NewGostClient(cnf config.GostConf, family string, o logging.LogOpts...
function newGostDB (line 84) | func newGostDB(cnf config.VulnDictInterface) (gostdb.DB, error) {
FILE: gost/microsoft.go
type Microsoft (line 29) | type Microsoft struct
method DetectCVEs (line 34) | func (ms Microsoft) DetectCVEs(r *models.ScanResult, _ bool) (nCVEs in...
method detect (line 204) | func (ms Microsoft) detect(r *models.ScanResult, cve gostmodels.Micros...
method ConvertToModel (line 373) | func (ms Microsoft) ConvertToModel(cve *gostmodels.MicrosoftCVE) (*mod...
FILE: gost/microsoft_test.go
function TestMicrosoft_detect (line 14) | func TestMicrosoft_detect(t *testing.T) {
FILE: gost/pseudo.go
type Pseudo (line 10) | type Pseudo struct
method DetectCVEs (line 15) | func (pse Pseudo) DetectCVEs(_ *models.ScanResult, _ bool) (int, error) {
FILE: gost/redhat.go
type RedHat (line 16) | type RedHat struct
method fillCvesWithRedHatAPI (line 20) | func (red RedHat) fillCvesWithRedHatAPI(r *models.ScanResult) error {
method setFixedCveToScanResult (line 64) | func (red RedHat) setFixedCveToScanResult(cve *gostmodels.RedhatCVE, r...
method parseCwe (line 84) | func (red RedHat) parseCwe(str string) (cwes []string) {
method ConvertToModel (line 99) | func (red RedHat) ConvertToModel(cve *gostmodels.RedhatCVE) (*models.C...
FILE: gost/redhat_test.go
function TestParseCwe (line 10) | func TestParseCwe(t *testing.T) {
FILE: gost/util.go
type response (line 22) | type response struct
function getCvesViaHTTP (line 27) | func getCvesViaHTTP(cveIDs []string, urlPrefix string) (
type request (line 84) | type request struct
function getCvesWithFixStateViaHTTP (line 90) | func getCvesWithFixStateViaHTTP(r *models.ScanResult, urlPrefix, fixStat...
function httpGet (line 152) | func httpGet(url string, req request, resChan chan<- response, errChan c...
function major (line 191) | func major(osVer string) (majorVersion string) {
function unique (line 195) | func unique[T comparable](s []T) []T {
FILE: logging/logutil.go
type LogOpts (line 19) | type LogOpts struct
type Logger (line 32) | type Logger struct
function init (line 36) | func init() {
function NewNormalLogger (line 44) | func NewNormalLogger() Logger {
function NewIODiscardLogger (line 49) | func NewIODiscardLogger() Logger {
function NewCustomLogger (line 56) | func NewCustomLogger(debug, quiet, logToFile bool, logDir, logMsgAnsiCol...
function GetDefaultLogDir (line 120) | func GetDefaultLogDir() string {
FILE: models/cvecontents.go
type CveContents (line 15) | type CveContents
method Except (line 42) | func (v CveContents) Except(exceptCtypes ...CveContentType) (values Cv...
method PrimarySrcURLs (line 53) | func (v CveContents) PrimarySrcURLs(lang, myFamily, cveID string, conf...
method PatchURLs (line 118) | func (v CveContents) PatchURLs() (urls []string) {
method Cpes (line 136) | func (v CveContents) Cpes(myFamily string) (values []CveContentCpes) {
method References (line 165) | func (v CveContents) References(myFamily string) (values []CveContentR...
method CweIDs (line 191) | func (v CveContents) CweIDs(myFamily string) (values []CveContentStr) {
method UniqCweIDs (line 215) | func (v CveContents) UniqCweIDs(myFamily string) []CveContentStr {
method SSVC (line 230) | func (v CveContents) SSVC() (value []CveContentSSVC) {
method Sort (line 248) | func (v CveContents) Sort() {
function NewCveContents (line 18) | func NewCveContents(conts ...CveContent) CveContents {
type CveContentStr (line 36) | type CveContentStr struct
type CveContentCpes (line 130) | type CveContentCpes struct
type CveContentRefs (line 159) | type CveContentRefs struct
type CveContentSSVC (line 224) | type CveContentSSVC struct
type CveContent (line 276) | type CveContent struct
method Empty (line 301) | func (c CveContent) Empty() bool {
type CveContentType (line 306) | type CveContentType
function NewCveContentType (line 309) | func NewCveContentType(name string) CveContentType {
function GetCveContentTypes (line 427) | func GetCveContentTypes(family string) []CveContentType {
constant Mitre (line 460) | Mitre CveContentType = "mitre"
constant Nvd (line 463) | Nvd CveContentType = "nvd"
constant Vulncheck (line 466) | Vulncheck CveContentType = "vulncheck"
constant Jvn (line 469) | Jvn CveContentType = "jvn"
constant Euvd (line 472) | Euvd CveContentType = "euvd"
constant Fortinet (line 475) | Fortinet CveContentType = "fortinet"
constant Paloalto (line 478) | Paloalto CveContentType = "paloalto"
constant Cisco (line 481) | Cisco CveContentType = "cisco"
constant RedHat (line 484) | RedHat CveContentType = "redhat"
constant RedHatAPI (line 487) | RedHatAPI CveContentType = "redhat_api"
constant Alma (line 490) | Alma CveContentType = "alma"
constant Rocky (line 493) | Rocky CveContentType = "rocky"
constant DebianSecurityTracker (line 496) | DebianSecurityTracker CveContentType = "debian_security_tracker"
constant Debian (line 499) | Debian CveContentType = "debian"
constant Ubuntu (line 502) | Ubuntu CveContentType = "ubuntu"
constant UbuntuAPI (line 505) | UbuntuAPI CveContentType = "ubuntu_api"
constant Oracle (line 508) | Oracle CveContentType = "oracle"
constant Amazon (line 511) | Amazon CveContentType = "amazon"
constant Fedora (line 514) | Fedora CveContentType = "fedora"
constant SUSE (line 517) | SUSE CveContentType = "suse"
constant Alpine (line 520) | Alpine CveContentType = "alpine"
constant Microsoft (line 523) | Microsoft CveContentType = "microsoft"
constant WpScan (line 526) | WpScan CveContentType = "wpscan"
constant Trivy (line 529) | Trivy CveContentType = "trivy"
constant TrivyNVD (line 532) | TrivyNVD CveContentType = "trivy:nvd"
constant TrivyRedHat (line 535) | TrivyRedHat CveContentType = "trivy:redhat"
constant TrivyRedHatOVAL (line 538) | TrivyRedHatOVAL CveContentType = "trivy:redhat-oval"
constant TrivyDebian (line 541) | TrivyDebian CveContentType = "trivy:debian"
constant TrivyUbuntu (line 544) | TrivyUbuntu CveContentType = "trivy:ubuntu"
constant TrivyCentOS (line 547) | TrivyCentOS CveContentType = "trivy:centos"
constant TrivyRocky (line 550) | TrivyRocky CveContentType = "trivy:rocky"
constant TrivyFedora (line 553) | TrivyFedora CveContentType = "trivy:fedora"
constant TrivyAmazon (line 556) | TrivyAmazon CveContentType = "trivy:amazon"
constant TrivyOracleOVAL (line 559) | TrivyOracleOVAL CveContentType = "trivy:oracle-oval"
constant TrivySuseCVRF (line 562) | TrivySuseCVRF CveContentType = "trivy:suse-cvrf"
constant TrivyAlpine (line 565) | TrivyAlpine CveContentType = "trivy:alpine"
constant TrivyArchLinux (line 568) | TrivyArchLinux CveContentType = "trivy:arch-linux"
constant TrivyAlma (line 571) | TrivyAlma CveContentType = "trivy:alma"
constant TrivyAzure (line 574) | TrivyAzure CveContentType = "trivy:azure"
constant TrivyCBLMariner (line 577) | TrivyCBLMariner CveContentType = "trivy:cbl-mariner"
constant TrivyPhoton (line 580) | TrivyPhoton CveContentType = "trivy:photon"
constant TrivyCoreOS (line 583) | TrivyCoreOS CveContentType = "trivy:coreos"
constant TrivyRubySec (line 586) | TrivyRubySec CveContentType = "trivy:ruby-advisory-db"
constant TrivyPhpSecurityAdvisories (line 589) | TrivyPhpSecurityAdvisories CveContentType = "trivy:php-security-advisories"
constant TrivyNodejsSecurityWg (line 592) | TrivyNodejsSecurityWg CveContentType = "trivy:nodejs-security-wg"
constant TrivyGHSA (line 595) | TrivyGHSA CveContentType = "trivy:ghsa"
constant TrivyGLAD (line 598) | TrivyGLAD CveContentType = "trivy:glad"
constant TrivyOSV (line 601) | TrivyOSV CveContentType = "trivy:osv"
constant TrivyWolfi (line 604) | TrivyWolfi CveContentType = "trivy:wolfi"
constant TrivyChainguard (line 607) | TrivyChainguard CveContentType = "trivy:chainguard"
constant TrivyBitnamiVulndb (line 610) | TrivyBitnamiVulndb CveContentType = "trivy:bitnami"
constant TrivyK8sVulnDB (line 613) | TrivyK8sVulnDB CveContentType = "trivy:k8s"
constant TrivyGoVulnDB (line 616) | TrivyGoVulnDB CveContentType = "trivy:govulndb"
constant TrivyAqua (line 619) | TrivyAqua CveContentType = "trivy:aqua"
constant TrivyEcho (line 622) | TrivyEcho CveContentType = "trivy:echo"
constant TrivyMinimOS (line 625) | TrivyMinimOS CveContentType = "trivy:minimos"
constant TrivyRootIO (line 628) | TrivyRootIO CveContentType = "trivy:rootio"
constant GitHub (line 631) | GitHub CveContentType = "github"
constant Unknown (line 634) | Unknown CveContentType = "unknown"
type CveContentTypes (line 638) | type CveContentTypes
method Except (line 702) | func (c CveContentTypes) Except(excepts ...CveContentType) (excepted C...
type Cpe (line 712) | type Cpe struct
type References (line 718) | type References
type Reference (line 721) | type Reference struct
type SSVC (line 729) | type SSVC struct
FILE: models/cvecontents_test.go
function TestCveContents_Except (line 10) | func TestCveContents_Except(t *testing.T) {
function TestSourceLinks (line 44) | func TestSourceLinks(t *testing.T) {
function TestCveContents_PatchURLs (line 176) | func TestCveContents_PatchURLs(t *testing.T) {
function TestCveContents_Cpes (line 222) | func TestCveContents_Cpes(t *testing.T) {
function TestCveContents_References (line 260) | func TestCveContents_References(t *testing.T) {
function TestCveContents_CweIDs (line 336) | func TestCveContents_CweIDs(t *testing.T) {
function TestCveContents_UniqCweIDs (line 377) | func TestCveContents_UniqCweIDs(t *testing.T) {
function TestCveContents_SSVC (line 414) | func TestCveContents_SSVC(t *testing.T) {
function TestCveContents_Sort (line 464) | func TestCveContents_Sort(t *testing.T) {
function TestCveContent_Empty (line 596) | func TestCveContent_Empty(t *testing.T) {
function TestNewCveContentType (line 637) | func TestNewCveContentType(t *testing.T) {
function TestGetCveContentTypes (line 664) | func TestGetCveContentTypes(t *testing.T) {
function TestCveContentTypes_Except (line 695) | func TestCveContentTypes_Except(t *testing.T) {
FILE: models/github.go
type DependencyGraphManifests (line 10) | type DependencyGraphManifests
type DependencyGraphManifest (line 13) | type DependencyGraphManifest struct
method RepoURLFilename (line 21) | func (m DependencyGraphManifest) RepoURLFilename() string {
method Ecosystem (line 27) | func (m DependencyGraphManifest) Ecosystem() string {
type Dependency (line 85) | type Dependency struct
method Version (line 93) | func (d Dependency) Version() string {
FILE: models/library.go
type LibraryScanners (line 8) | type LibraryScanners
method Find (line 11) | func (lss LibraryScanners) Find(path, name string) map[string]Library {
method Total (line 25) | func (lss LibraryScanners) Total() (total int) {
type LibraryScanner (line 33) | type LibraryScanner struct
method GetLibraryKey (line 85) | func (s LibraryScanner) GetLibraryKey() string {
type Library (line 42) | type Library struct
type LibraryFixedIn (line 117) | type LibraryFixedIn struct
FILE: models/library_test.go
function TestLibraryScanners_Find (line 8) | func TestLibraryScanners_Find(t *testing.T) {
FILE: models/models.go
constant JSONVersion (line 4) | JSONVersion = 4
FILE: models/packages.go
type Packages (line 19) | type Packages
method MergeNewVersion (line 31) | func (ps Packages) MergeNewVersion(as Packages) {
method Merge (line 49) | func (ps Packages) Merge(other Packages) Packages {
method FindOne (line 57) | func (ps Packages) FindOne(f func(Package) bool) (string, Package, boo...
method FindByFQPN (line 67) | func (ps Packages) FindByFQPN(nameVerRel string) (*Package, error) {
function NewPackages (line 22) | func NewPackages(packs ...Package) Packages {
type Package (line 77) | type Package struct
method FQPN (line 94) | func (p Package) FQPN() string {
method FormatVer (line 106) | func (p Package) FormatVer() string {
method FormatNewVer (line 115) | func (p Package) FormatNewVer() string {
method FormatVersionFromTo (line 124) | func (p Package) FormatVersionFromTo(stat PackageFixStatus) string {
method FormatChangelog (line 144) | func (p Package) FormatChangelog() string {
method HasReachablePort (line 204) | func (p Package) HasReachablePort() bool {
type Changelog (line 168) | type Changelog struct
type AffectedProcess (line 174) | type AffectedProcess struct
type PortStat (line 182) | type PortStat struct
function NewPortStat (line 189) | func NewPortStat(ipPort string) (*PortStat, error) {
type NeedRestartProcess (line 216) | type NeedRestartProcess struct
type SrcPackage (line 229) | type SrcPackage struct
method AddBinaryName (line 237) | func (s *SrcPackage) AddBinaryName(name string) {
type SrcPackages (line 246) | type SrcPackages
method FindByBinName (line 249) | func (s SrcPackages) FindByBinName(name string) (*SrcPackage, bool) {
function IsRaspbianPackage (line 270) | func IsRaspbianPackage(name, version string) bool {
function RenameKernelSourcePackageName (line 278) | func RenameKernelSourcePackageName(family, name string) string {
function IsKernelSourcePackage (line 298) | func IsKernelSourcePackage(family, name string) bool {
FILE: models/packages_test.go
function TestMergeNewVersion (line 12) | func TestMergeNewVersion(t *testing.T) {
function TestMerge (line 47) | func TestMerge(t *testing.T) {
function TestAddBinaryName (line 77) | func TestAddBinaryName(t *testing.T) {
function TestFindByBinName (line 123) | func TestFindByBinName(t *testing.T) {
function TestPackage_FormatVersionFromTo (line 181) | func TestPackage_FormatVersionFromTo(t *testing.T) {
function Test_IsRaspbianPackage (line 303) | func Test_IsRaspbianPackage(t *testing.T) {
function Test_NewPortStat (line 387) | func Test_NewPortStat(t *testing.T) {
function TestRenameKernelSourcePackageName (line 434) | func TestRenameKernelSourcePackageName(t *testing.T) {
function TestIsKernelSourcePackage (line 486) | func TestIsKernelSourcePackage(t *testing.T) {
FILE: models/scanresults.go
type ScanResults (line 19) | type ScanResults
type ScanResult (line 22) | type ScanResult struct
method FilterInactiveWordPressLibs (line 95) | func (r *ScanResult) FilterInactiveWordPressLibs(detectInactive bool) {
method ReportFileName (line 120) | func (r ScanResult) ReportFileName() (name string) {
method ReportKeyName (line 128) | func (r ScanResult) ReportKeyName() (name string) {
method ServerInfo (line 137) | func (r ScanResult) ServerInfo() string {
method ServerInfoTui (line 152) | func (r ScanResult) ServerInfoTui() string {
method FormatServerName (line 173) | func (r ScanResult) FormatServerName() (name string) {
method FormatTextReportHeader (line 187) | func (r ScanResult) FormatTextReportHeader() string {
method FormatUpdatablePkgsSummary (line 214) | func (r ScanResult) FormatUpdatablePkgsSummary() string {
method FormatExploitCveSummary (line 235) | func (r ScanResult) FormatExploitCveSummary() string {
method FormatMetasploitCveSummary (line 246) | func (r ScanResult) FormatMetasploitCveSummary() string {
method FormatKEVCveSummary (line 257) | func (r ScanResult) FormatKEVCveSummary() string {
method FormatAlertSummary (line 268) | func (r ScanResult) FormatAlertSummary() string {
method isDisplayUpdatableNum (line 282) | func (r ScanResult) isDisplayUpdatableNum(mode config.ScanMode) bool {
method IsContainer (line 309) | func (r ScanResult) IsContainer() bool {
method ClearFields (line 314) | func (r ScanResult) ClearFields(targetTagNames []string) ScanResult {
method CheckEOL (line 334) | func (r *ScanResult) CheckEOL() {
method SortForJSONOutput (line 371) | func (r *ScanResult) SortForJSONOutput() {
type Container (line 67) | type Container struct
type Platform (line 76) | type Platform struct
type Kernel (line 82) | type Kernel struct
type WindowsKB (line 89) | type WindowsKB struct
type CweDict (line 427) | type CweDict
method Get (line 436) | func (c CweDict) Get(cweID, lang string) (name, url string, owasp, cwe...
type AttentionCWE (line 430) | type AttentionCWE struct
function fillAttentionCwe (line 464) | func fillAttentionCwe(dict CweDictEntry, lang string) (owasp, cwe25, san...
type CweDictEntry (line 501) | type CweDictEntry struct
FILE: models/scanresults_test.go
function TestIsDisplayUpdatableNum (line 11) | func TestIsDisplayUpdatableNum(t *testing.T) {
function TestScanResult_Sort (line 112) | func TestScanResult_Sort(t *testing.T) {
FILE: models/utils.go
function ConvertJvnToModel (line 16) | func ConvertJvnToModel(cveID string, jvns []cvedict.Jvn) []CveContent {
function ConvertEuvdToModel (line 58) | func ConvertEuvdToModel(cveID string, euvds []cvedict.Euvd) []CveContent {
function ConvertNvdToModel (line 131) | func ConvertNvdToModel(cveID string, nvds []cvedict.Nvd) ([]CveContent, ...
function ConvertVulncheckToModel (line 232) | func ConvertVulncheckToModel(cveID string, vulnchecks []cvedict.Vulnchec...
function ConvertFortinetToModel (line 321) | func ConvertFortinetToModel(cveID string, fortinets []cvedict.Fortinet) ...
function ConvertMitreToModel (line 356) | func ConvertMitreToModel(cveID string, mitres []cvedict.Mitre) []CveCont...
function ConvertPaloaltoToModel (line 475) | func ConvertPaloaltoToModel(cveID string, paloaltos []cvedict.Paloalto) ...
function ConvertCiscoToModel (line 567) | func ConvertCiscoToModel(cveID string, ciscos []cvedict.Cisco) []CveCont...
FILE: models/utils_test.go
function TestConvertEuvdToModel (line 16) | func TestConvertEuvdToModel(t *testing.T) {
function TestConvertVulncheckToModel (line 195) | func TestConvertVulncheckToModel(t *testing.T) {
function TestConvertPaloaltoToModel (line 338) | func TestConvertPaloaltoToModel(t *testing.T) {
function TestConvertCiscoToModel (line 424) | func TestConvertCiscoToModel(t *testing.T) {
FILE: models/vulninfos.go
type VulnInfos (line 19) | type VulnInfos
method Find (line 22) | func (v VulnInfos) Find(f func(VulnInfo) bool) VulnInfos {
method FilterByCvssOver (line 33) | func (v VulnInfos) FilterByCvssOver(over float64) (_ VulnInfos, nFilte...
method FilterByConfidenceOver (line 44) | func (v VulnInfos) FilterByConfidenceOver(over int) (_ VulnInfos, nFil...
method FilterIgnoreCves (line 57) | func (v VulnInfos) FilterIgnoreCves(ignoreCveIDs []string) (_ VulnInfo...
method FilterUnfixed (line 68) | func (v VulnInfos) FilterUnfixed(ignoreUnfixed bool) (_ VulnInfos, nFi...
method FilterIgnorePkgs (line 89) | func (v VulnInfos) FilterIgnorePkgs(ignorePkgsRegexps []string) (_ Vul...
method FindScoredVulns (line 124) | func (v VulnInfos) FindScoredVulns() (_ VulnInfos, nFiltered int) {
method ToSortedSlice (line 135) | func (v VulnInfos) ToSortedSlice() (sorted []VulnInfo) {
method CountGroupBySeverity (line 149) | func (v VulnInfos) CountGroupBySeverity() map[string]int {
method FormatCveSummary (line 176) | func (v VulnInfos) FormatCveSummary() string {
method FormatFixedStatus (line 190) | func (v VulnInfos) FormatFixedStatus(packs Packages) string {
method CountDiff (line 202) | func (v VulnInfos) CountDiff() (nPlus int, nMinus int) {
type PackageFixStatuses (line 216) | type PackageFixStatuses
method Names (line 219) | func (ps PackageFixStatuses) Names() (names []string) {
method Store (line 227) | func (ps PackageFixStatuses) Store(pkg PackageFixStatus) PackageFixSta...
method Sort (line 239) | func (ps PackageFixStatuses) Sort() {
type PackageFixStatus (line 249) | type PackageFixStatus struct
type VulnInfo (line 257) | type VulnInfo struct
method CveIDDiffFormat (line 383) | func (v VulnInfo) CveIDDiffFormat() string {
method Titles (line 391) | func (v VulnInfo) Titles(lang, myFamily string) (values []CveContentSt...
method Summaries (line 452) | func (v VulnInfo) Summaries(lang, myFamily string) (values []CveConten...
method Cvss2Scores (line 510) | func (v VulnInfo) Cvss2Scores() (values []CveContentCvss) {
method Cvss3Scores (line 535) | func (v VulnInfo) Cvss3Scores() (values []CveContentCvss) {
method Cvss40Scores (line 608) | func (v VulnInfo) Cvss40Scores() (values []CveContentCvss) {
method MaxCvssScore (line 633) | func (v VulnInfo) MaxCvssScore() CveContentCvss {
method MaxCvss40Score (line 646) | func (v VulnInfo) MaxCvss40Score() CveContentCvss {
method MaxCvss3Score (line 660) | func (v VulnInfo) MaxCvss3Score() CveContentCvss {
method MaxCvss2Score (line 674) | func (v VulnInfo) MaxCvss2Score() CveContentCvss {
method AttackVector (line 688) | func (v VulnInfo) AttackVector() string {
method PatchStatus (line 714) | func (v VulnInfo) PatchStatus(packs Packages) string {
method FormatMaxCvssScore (line 844) | func (v VulnInfo) FormatMaxCvssScore() string {
type Alert (line 279) | type Alert struct
type GitHubSecurityAlerts (line 286) | type GitHubSecurityAlerts
method Add (line 289) | func (g GitHubSecurityAlerts) Add(alert GitHubSecurityAlert) GitHubSec...
method Names (line 299) | func (g GitHubSecurityAlerts) Names() (names []string) {
type GitHubSecurityAlert (line 307) | type GitHubSecurityAlert struct
method RepoURLPackageName (line 318) | func (a GitHubSecurityAlert) RepoURLPackageName() string {
method RepoURLManifestPath (line 323) | func (a GitHubSecurityAlert) RepoURLManifestPath() string {
type GSAVulnerablePackage (line 328) | type GSAVulnerablePackage struct
type LibraryFixedIns (line 337) | type LibraryFixedIns
method Names (line 340) | func (lfs LibraryFixedIns) Names() (names []string) {
type WpPackageFixStats (line 348) | type WpPackageFixStats
method Names (line 351) | func (ws WpPackageFixStats) Names() (names []string) {
type WpPackages (line 359) | type WpPackages
method Add (line 362) | func (g WpPackages) Add(pkg WpPackage) WpPackages {
type DiffStatus (line 372) | type DiffStatus
constant DiffPlus (line 376) | DiffPlus = DiffStatus("+")
constant DiffMinus (line 379) | DiffMinus = DiffStatus("-")
type CveContentCvss (line 758) | type CveContentCvss struct
type CvssType (line 764) | type CvssType
constant CVSS2 (line 768) | CVSS2 CvssType = "2"
constant CVSS3 (line 771) | CVSS3 CvssType = "3"
constant CVSS40 (line 774) | CVSS40 CvssType = "4.0"
type Cvss (line 778) | type Cvss struct
method Format (line 787) | func (c Cvss) Format() string {
method SeverityToCvssScoreRange (line 795) | func (c Cvss) SeverityToCvssScoreRange() string {
function severityToCvssScoreRange (line 799) | func severityToCvssScoreRange(severity string) string {
function severityToCvssScoreRoughly (line 829) | func severityToCvssScoreRoughly(severity string) float64 {
type DistroAdvisories (line 853) | type DistroAdvisories
method AppendIfMissing (line 856) | func (advs *DistroAdvisories) AppendIfMissing(adv *DistroAdvisory) bool {
type DistroAdvisory (line 867) | type DistroAdvisory struct
method Format (line 876) | func (p DistroAdvisory) Format() string {
type Exploit (line 890) | type Exploit struct
type Metasploit (line 904) | type Metasploit struct
type Mitigation (line 912) | type Mitigation struct
type KEVType (line 919) | type KEVType
constant CISAKEVType (line 923) | CISAKEVType KEVType = "cisa"
constant VulnCheckKEVType (line 925) | VulnCheckKEVType KEVType = "vulncheck"
type KEV (line 929) | type KEV struct
type CISAKEV (line 945) | type CISAKEV struct
type VulnCheckKEV (line 950) | type VulnCheckKEV struct
type VulnCheckXDB (line 956) | type VulnCheckXDB struct
type VulnCheckReportedExploitation (line 965) | type VulnCheckReportedExploitation struct
type AlertDict (line 971) | type AlertDict struct
method IsEmpty (line 978) | func (a AlertDict) IsEmpty() bool {
method FormatSource (line 983) | func (a AlertDict) FormatSource() string {
type Confidences (line 991) | type Confidences
method AppendIfMissing (line 994) | func (cs *Confidences) AppendIfMissing(confidence Confidence) {
method SortByConfident (line 1004) | func (cs Confidences) SortByConfident() Confidences {
type Confidence (line 1013) | type Confidence struct
method String (line 1019) | func (c Confidence) String() string {
type DetectionMethod (line 1026) | type DetectionMethod
constant NvdExactVersionMatchStr (line 1030) | NvdExactVersionMatchStr = "NvdExactVersionMatch"
constant NvdRoughVersionMatchStr (line 1033) | NvdRoughVersionMatchStr = "NvdRoughVersionMatch"
constant NvdVendorProductMatchStr (line 1036) | NvdVendorProductMatchStr = "NvdVendorProductMatch"
constant VulncheckExactVersionMatchStr (line 1039) | VulncheckExactVersionMatchStr = "VulncheckExactVersionMatch"
constant VulncheckRoughVersionMatchStr (line 1042) | VulncheckRoughVersionMatchStr = "VulncheckRoughVersionMatch"
constant VulncheckVendorProductMatchStr (line 1045) | VulncheckVendorProductMatchStr = "VulncheckVendorProductMatch"
constant JvnVendorProductMatchStr (line 1048) | JvnVendorProductMatchStr = "JvnVendorProductMatch"
constant FortinetExactVersionMatchStr (line 1051) | FortinetExactVersionMatchStr = "FortinetExactVersionMatch"
constant FortinetRoughVersionMatchStr (line 1054) | FortinetRoughVersionMatchStr = "FortinetRoughVersionMatch"
constant FortinetVendorProductMatchStr (line 1057) | FortinetVendorProductMatchStr = "FortinetVendorProductMatch"
constant PaloaltoExactVersionMatchStr (line 1060) | PaloaltoExactVersionMatchStr = "PaloaltoExactVersionMatch"
constant PaloaltoRoughVersionMatchStr (line 1063) | PaloaltoRoughVersionMatchStr = "PaloaltoRoughVersionMatch"
constant PaloaltoVendorProductMatchStr (line 1066) | PaloaltoVendorProductMatchStr = "PaloaltoVendorProductMatch"
constant CiscoExactVersionMatchStr (line 1069) | CiscoExactVersionMatchStr = "CiscoExactVersionMatch"
constant CiscoRoughVersionMatchStr (line 1072) | CiscoRoughVersionMatchStr = "CiscoRoughVersionMatch"
constant CiscoVendorProductMatchStr (line 1075) | CiscoVendorProductMatchStr = "CiscoVendorProductMatch"
constant PkgAuditMatchStr (line 1078) | PkgAuditMatchStr = "PkgAuditMatch"
constant OvalMatchStr (line 1081) | OvalMatchStr = "OvalMatch"
constant RedHatAPIStr (line 1084) | RedHatAPIStr = "RedHatAPIMatch"
constant DebianSecurityTrackerMatchStr (line 1087) | DebianSecurityTrackerMatchStr = "DebianSecurityTrackerMatch"
constant UbuntuAPIMatchStr (line 1090) | UbuntuAPIMatchStr = "UbuntuAPIMatch"
constant WindowsUpdateSearchStr (line 1093) | WindowsUpdateSearchStr = "WindowsUpdateSearch"
constant WindowsRoughMatchStr (line 1096) | WindowsRoughMatchStr = "WindowsRoughMatch"
constant TrivyMatchStr (line 1099) | TrivyMatchStr = "TrivyMatch"
constant ChangelogExactMatchStr (line 1102) | ChangelogExactMatchStr = "ChangelogExactMatch"
constant ChangelogRoughMatchStr (line 1105) | ChangelogRoughMatchStr = "ChangelogRoughMatch"
constant GitHubMatchStr (line 1108) | GitHubMatchStr = "GitHubMatch"
constant WpScanMatchStr (line 1111) | WpScanMatchStr = "WpScanMatch"
constant FailedToGetChangelog (line 1114) | FailedToGetChangelog = "FailedToGetChangelog"
constant FailedToFindVersionInChangelog (line 1117) | FailedToFindVersionInChangelog = "FailedToFindVersionInChangelog"
FILE: models/vulninfos_test.go
function TestTitles (line 9) | func TestTitles(t *testing.T) {
function TestSummaries (line 110) | func TestSummaries(t *testing.T) {
function TestCountGroupBySeverity (line 213) | func TestCountGroupBySeverity(t *testing.T) {
function TestToSortedSlice (line 338) | func TestToSortedSlice(t *testing.T) {
function TestCvss2Scores (line 505) | func TestCvss2Scores(t *testing.T) {
function TestMaxCvss2Scores (line 584) | func TestMaxCvss2Scores(t *testing.T) {
function TestCvss3Scores (line 645) | func TestCvss3Scores(t *testing.T) {
function TestMaxCvss3Scores (line 735) | func TestMaxCvss3Scores(t *testing.T) {
function TestMaxCvssScores (line 783) | func TestMaxCvssScores(t *testing.T) {
function TestFormatMaxCvssScore (line 984) | func TestFormatMaxCvssScore(t *testing.T) {
function TestSortPackageStatues (line 1043) | func TestSortPackageStatues(t *testing.T) {
function TestStorePackageStatuses (line 1089) | func TestStorePackageStatuses(t *testing.T) {
function TestAppendIfMissing (line 1118) | func TestAppendIfMissing(t *testing.T) {
function TestSortByConfident (line 1152) | func TestSortByConfident(t *testing.T) {
function TestDistroAdvisories_AppendIfMissing (line 1186) | func TestDistroAdvisories_AppendIfMissing(t *testing.T) {
function TestVulnInfo_AttackVector (line 1248) | func TestVulnInfo_AttackVector(t *testing.T) {
function TestVulnInfos_FilterByCvssOver (line 1331) | func TestVulnInfos_FilterByCvssOver(t *testing.T) {
function TestVulnInfos_FilterIgnoreCves (line 1506) | func TestVulnInfos_FilterIgnoreCves(t *testing.T) {
function TestVulnInfos_FilterUnfixed (line 1555) | func TestVulnInfos_FilterUnfixed(t *testing.T) {
function TestVulnInfos_FilterIgnorePkgs (line 1642) | func TestVulnInfos_FilterIgnorePkgs(t *testing.T) {
function TestVulnInfos_FilterByConfidenceOver (line 1726) | func TestVulnInfos_FilterByConfidenceOver(t *testing.T) {
function TestVulnInfo_PatchStatus (line 1807) | func TestVulnInfo_PatchStatus(t *testing.T) {
function TestVulnInfo_Cvss40Scores (line 1962) | func TestVulnInfo_Cvss40Scores(t *testing.T) {
function TestVulnInfo_MaxCvss40Score (line 2034) | func TestVulnInfo_MaxCvss40Score(t *testing.T) {
function TestVulnInfos_FormatFixedStatus (line 2086) | func TestVulnInfos_FormatFixedStatus(t *testing.T) {
FILE: models/wordpress.go
type WordPressPackages (line 4) | type WordPressPackages
method CoreVersion (line 7) | func (w WordPressPackages) CoreVersion() string {
method Plugins (line 17) | func (w WordPressPackages) Plugins() (ps []WpPackage) {
method Themes (line 27) | func (w WordPressPackages) Themes() (ps []WpPackage) {
method Find (line 37) | func (w WordPressPackages) Find(name string) (ps *WpPackage, found boo...
constant WPCore (line 48) | WPCore = "core"
constant WPPlugin (line 50) | WPPlugin = "plugin"
constant WPTheme (line 52) | WPTheme = "theme"
constant Inactive (line 55) | Inactive = "inactive"
type WpPackage (line 59) | type WpPackage struct
type WpPackageFixStatus (line 68) | type WpPackageFixStatus struct
FILE: reporter/azureblob.go
type AzureBlobWriter (line 17) | type AzureBlobWriter struct
method Write (line 28) | func (w AzureBlobWriter) Write(rs ...models.ScanResult) (err error) {
method Validate (line 84) | func (w AzureBlobWriter) Validate() error {
method getBlobClient (line 105) | func (w AzureBlobWriter) getBlobClient() (*azblob.Client, error) {
method createBlockBlob (line 119) | func (w AzureBlobWriter) createBlockBlob(cli *azblob.Client, k string,...
FILE: reporter/chatwork.go
type ChatWorkWriter (line 18) | type ChatWorkWriter struct
method Write (line 24) | func (w ChatWorkWriter) Write(rs ...models.ScanResult) (err error) {
method chatWorkpostMessage (line 55) | func (w ChatWorkWriter) chatWorkpostMessage(message string) error {
FILE: reporter/email.go
type EMailWriter (line 20) | type EMailWriter struct
method Write (line 28) | func (w EMailWriter) Write(rs ...models.ScanResult) (err error) {
type EMailSender (line 94) | type EMailSender interface
type emailSender (line 98) | type emailSender struct
method sendMail (line 102) | func (e *emailSender) sendMail(smtpServerAddr, message string) (err er...
method Send (line 193) | func (e *emailSender) Send(subject, body string) (err error) {
method newSaslClient (line 225) | func (e *emailSender) newSaslClient(authList []string) sasl.Client {
function NewEMailSender (line 221) | func NewEMailSender(cnf config.SMTPConf) EMailSender {
FILE: reporter/googlechat.go
type GoogleChatWriter (line 19) | type GoogleChatWriter struct
method Write (line 25) | func (w GoogleChatWriter) Write(rs ...models.ScanResult) (err error) {
method postMessage (line 75) | func (w GoogleChatWriter) postMessage(message string) error {
method checkResponse (line 97) | func (w GoogleChatWriter) checkResponse(r *http.Response) error {
FILE: reporter/http.go
type HTTPRequestWriter (line 15) | type HTTPRequestWriter struct
method Write (line 20) | func (w HTTPRequestWriter) Write(rs ...models.ScanResult) (err error) {
type HTTPResponseWriter (line 44) | type HTTPResponseWriter struct
method Write (line 49) | func (w HTTPResponseWriter) Write(rs ...models.ScanResult) (err error) {
FILE: reporter/localfile.go
type LocalFileWriter (line 17) | type LocalFileWriter struct
method Write (line 33) | func (w LocalFileWriter) Write(rs ...models.ScanResult) (err error) {
method writeFile (line 136) | func (w LocalFileWriter) writeFile(path string, data []byte, perm os.F...
FILE: reporter/s3.go
type S3Writer (line 24) | type S3Writer struct
method getS3 (line 34) | func (w S3Writer) getS3() (*s3.Client, error) {
method Write (line 65) | func (w S3Writer) Write(rs ...models.ScanResult) (err error) {
method Validate (line 122) | func (w S3Writer) Validate() error {
method putObject (line 152) | func (w S3Writer) putObject(svc *s3.Client, k string, b []byte, gzip b...
FILE: reporter/sbom/cyclonedx.go
function ToCycloneDX (line 21) | func ToCycloneDX(r models.ScanResult) *cdx.BOM {
function SerializeCycloneDX (line 30) | func SerializeCycloneDX(bom *cdx.BOM, format cdx.BOMFileFormat) ([]byte,...
function cdxMetadata (line 40) | func cdxMetadata(result models.ScanResult) *cdx.Metadata {
function cdxComponents (line 58) | func cdxComponents(result models.ScanResult, metaBomRef string) (*[]cdx....
function osToCdxComponent (line 116) | func osToCdxComponent(r models.ScanResult) *cdx.Component {
function ospkgToCdxComponents (line 163) | func ospkgToCdxComponents(r models.ScanResult, ospkgToPURL map[string]st...
function cpeToCdxComponents (line 228) | func cpeToCdxComponents(scannedCves models.VulnInfos) []cdx.Component {
function libpkgToCdxComponents (line 264) | func libpkgToCdxComponents(libscanner models.LibraryScanner, libpkgToPUR...
function ghpkgToCdxComponents (line 298) | func ghpkgToCdxComponents(m models.DependencyGraphManifest, ghpkgToPURL ...
function wppkgToCdxComponents (line 332) | func wppkgToCdxComponents(wppkgs models.WordPressPackages, wppkgToPURL m...
function cdxDependencies (line 366) | func cdxDependencies(bomRefs map[string][]string) *[]cdx.Dependency {
function cdxVulnerabilities (line 378) | func cdxVulnerabilities(result models.ScanResult, ospkgToPURL map[string...
function cdxRatings (line 393) | func cdxRatings(cveContents models.CveContents) *[]cdx.VulnerabilityRati...
function cdxCVSS2Rating (line 416) | func cdxCVSS2Rating(source, vector string, score float64, severity strin...
function cdxCVSS3Rating (line 438) | func cdxCVSS3Rating(source, vector string, score float64, severity strin...
function cdxCVSS40Rating (line 467) | func cdxCVSS40Rating(source, vector string, score float64, severity stri...
function cdxAffects (line 493) | func cdxAffects(cve models.VulnInfo, ospkgToPURL map[string]string, libp...
function cdxCWEs (line 528) | func cdxCWEs(cveContents models.CveContents) *[]int {
function cdxDescription (line 553) | func cdxDescription(cveContents models.CveContents) string {
function cdxAdvisories (line 560) | func cdxAdvisories(cveContents models.CveContents) *[]cdx.Advisory {
FILE: reporter/sbom/cyclonedx_test.go
function TestToCycloneDX (line 15) | func TestToCycloneDX(t *testing.T) {
FILE: reporter/sbom/purl.go
function osPkgToPURL (line 14) | func osPkgToPURL(osFamily, osVersion string, pkg models.Package) *packag...
function libPkgToPURL (line 61) | func libPkgToPURL(libScanner models.LibraryScanner, lib models.Library) ...
function ghPkgToPURL (line 72) | func ghPkgToPURL(m models.DependencyGraphManifest, dep models.Dependency...
function wpPkgToPURL (line 78) | func wpPkgToPURL(wpPkg models.WpPackage) *packageurl.PackageURL {
function purlType (line 82) | func purlType(t ftypes.LangType) string {
function ghEcosystemToPurlType (line 119) | func ghEcosystemToPurlType(t string) string {
function parsePkgName (line 152) | func parsePkgName(t, n string) (string, string, string) {
FILE: reporter/sbom/purl_test.go
function TestParsePkgName (line 9) | func TestParsePkgName(t *testing.T) {
FILE: reporter/sbom/spdx.go
constant creatorOrganization (line 21) | creatorOrganization = "future-architect"
constant creatorTool (line 22) | creatorTool = "vuls"
constant documentNamespace (line 23) | documentNamespace = "https://www.future.co.jp/spdxdoc"
constant documentSPDXIdentifier (line 25) | documentSPDXIdentifier = "DOCUMENT"
constant elementOperatingSystem (line 26) | elementOperatingSystem = "Operating-System"
constant elementPackage (line 27) | elementPackage = "Package"
constant packagePurposeOS (line 29) | packagePurposeOS = "OPERATING-SYSTEM"
constant packagePurposeApplication (line 30) | packagePurposeApplication = "APPLICATION"
constant packagePurposeLibrary (line 31) | packagePurposeLibrary = "LIBRARY"
constant packageAnnotatorTool (line 33) | packageAnnotatorTool = "Tool"
constant annotationOther (line 34) | annotationOther = "Other"
constant valueNone (line 36) | valueNone = "NONE"
constant relationshipDescribe (line 38) | relationshipDescribe = common.TypeRelationshipDescribe
constant relationshipContains (line 39) | relationshipContains = common.TypeRelationshipContains
constant relationshipDepensOn (line 40) | relationshipDepensOn = common.TypeRelationshipDependsOn
constant categoryPackageManager (line 42) | categoryPackageManager = common.CategoryPackageManager
constant packageManagerPURL (line 43) | packageManagerPURL = common.TypePackageManagerPURL
constant categorySecurity (line 45) | categorySecurity = common.CategorySecurity
constant securityCPE23Type (line 46) | securityCPE23Type = common.TypeSecurityCPE23Type
constant securityAdvisory (line 47) | securityAdvisory = common.TypeSecurityAdvisory
function ToSPDX (line 51) | func ToSPDX(r models.ScanResult, toolName string) spdx.Document {
function SerializeSPDX (line 75) | func SerializeSPDX(doc spdx.Document) ([]byte, error) {
function osToSpdxPackage (line 79) | func osToSpdxPackage(r models.ScanResult) spdx.Package {
function spdxCreationInfo (line 113) | func spdxCreationInfo(result models.ScanResult, toolName string) spdx.Cr...
function spdxPackages (line 127) | func spdxPackages(result models.ScanResult, root spdx.Package) ([]*spdx....
function ospkgToSPDXPackages (line 196) | func ospkgToSPDXPackages(r models.ScanResult, packageToURLMap map[string...
function cpeToSPDXPackages (line 253) | func cpeToSPDXPackages(r models.ScanResult, packageToURLMap map[string][...
function libpkgToSPDXPackages (line 295) | func libpkgToSPDXPackages(libScanner models.LibraryScanner, packageToURL...
function ghpkgToSPDXPackages (line 333) | func ghpkgToSPDXPackages(ghm models.DependencyGraphManifest, packageToUR...
function wppkgToSPDXPackages (line 371) | func wppkgToSPDXPackages(wppkgs models.WordPressPackages, packageToURLMa...
function generateSDPXIDentifier (line 409) | func generateSDPXIDentifier(packageType string) spdx.ElementID {
function appendAnnotation (line 413) | func appendAnnotation(annotations []spdx.Annotation, key, value string, ...
function appendExternalRefs (line 428) | func appendExternalRefs(extRefs []*spdx.PackageExternalReference, catego...
function makeSPDXRelationship (line 440) | func makeSPDXRelationship(refA, refB spdx.ElementID, relationship string...
function createPackageToURLMap (line 458) | func createPackageToURLMap(r models.ScanResult) map[string][]string {
function sortSDPXDocument (line 527) | func sortSDPXDocument(doc *spdx.Document) {
FILE: reporter/sbom/spdx_test.go
function TestToSPDX (line 16) | func TestToSPDX(t *testing.T) {
FILE: reporter/slack.go
type SlackWriter (line 20) | type SlackWriter struct
method Write (line 37) | func (w SlackWriter) Write(rs ...models.ScanResult) (err error) {
method send (line 137) | func (w SlackWriter) send(msg message) error {
method toSlackAttachments (line 170) | func (w SlackWriter) toSlackAttachments(r models.ScanResult) (attaches...
method attachmentText (line 252) | func (w SlackWriter) attachmentText(vinfo models.VulnInfo, cweDict map...
method cweIDs (line 330) | func (w SlackWriter) cweIDs(vinfo models.VulnInfo, osFamily string, cw...
method getNotifyUsers (line 353) | func (w SlackWriter) getNotifyUsers(notifyUsers []string) string {
type message (line 28) | type message struct
function cvssColor (line 239) | func cvssColor(cvssScore float64) string {
FILE: reporter/slack_test.go
function TestGetNotifyUsers (line 5) | func TestGetNotifyUsers(t *testing.T) {
FILE: reporter/stdout.go
type StdoutWriter (line 11) | type StdoutWriter struct
method WriteScanSummary (line 20) | func (w StdoutWriter) WriteScanSummary(rs ...models.ScanResult) {
method Write (line 28) | func (w StdoutWriter) Write(rs ...models.ScanResult) error {
FILE: reporter/syslog.go
type SyslogWriter (line 17) | type SyslogWriter struct
method Write (line 22) | func (w SyslogWriter) Write(rs ...models.ScanResult) (err error) {
method encodeSyslog (line 43) | func (w SyslogWriter) encodeSyslog(result models.ScanResult) (messages...
FILE: reporter/syslog_test.go
function TestSyslogWriterEncodeSyslog (line 13) | func TestSyslogWriterEncodeSyslog(t *testing.T) {
FILE: reporter/telegram.go
type TelegramWriter (line 19) | type TelegramWriter struct
method Write (line 25) | func (w TelegramWriter) Write(rs ...models.ScanResult) (err error) {
method sendMessage (line 61) | func (w TelegramWriter) sendMessage(chatID, token, message string) err...
method checkResponse (line 85) | func (w TelegramWriter) checkResponse(r *http.Response) error {
FILE: reporter/util.go
constant maxColWidth (line 33) | maxColWidth = 100
function OverwriteJSONFile (line 37) | func OverwriteJSONFile(dir string, r models.ScanResult) error {
function LoadScanResults (line 49) | func LoadScanResults(jsonDir string) (results models.ScanResults, err er...
function loadOneServerScanResult (line 73) | func loadOneServerScanResult(jsonFile string) (*models.ScanResult, error) {
function ListValidJSONDirs (line 97) | func ListValidJSONDirs(resultsDir string) (dirs []string, err error) {
function JSONDir (line 124) | func JSONDir(resultsDir string, args []string) (path string, err error) {
function formatScanSummary (line 165) | func formatScanSummary(rs ...models.ScanResult) string {
function formatOneLineSummary (line 203) | func formatOneLineSummary(rs ...models.ScanResult) string {
function formatList (line 245) | func formatList(r models.ScanResult) (string, error) {
function formatFullPlainText (line 349) | func formatFullPlainText(r models.ScanResult) (string, error) {
function terminalWidth (line 661) | func terminalWidth() int {
function formatCsvList (line 688) | func formatCsvList(r models.ScanResult, path string) error {
function diff (line 728) | func diff(curResults, preResults models.ScanResults, isPlus, isMinus boo...
function getPlusDiffCves (line 777) | func getPlusDiffCves(previous, current models.ScanResult) models.VulnInf...
function getMinusDiffCves (line 817) | func getMinusDiffCves(previous, current models.ScanResult) models.VulnIn...
function isCveInfoUpdated (line 838) | func isCveInfoUpdated(cveID string, previous, current models.ScanResult)...
FILE: reporter/util_test.go
function TestMain (line 13) | func TestMain(m *testing.M) {
function TestIsCveInfoUpdated (line 20) | func TestIsCveInfoUpdated(t *testing.T) {
function TestPlusMinusDiff (line 176) | func TestPlusMinusDiff(t *testing.T) {
function TestPlusDiff (line 327) | func TestPlusDiff(t *testing.T) {
function TestMinusDiff (line 482) | func TestMinusDiff(t *testing.T) {
FILE: reporter/writer.go
type ResultWriter (line 11) | type ResultWriter interface
function gz (line 15) | func gz(data []byte) ([]byte, error) {
FILE: saas/saas.go
type Writer (line 29) | type Writer struct
method Write (line 51) | func (w Writer) Write(rs ...models.ScanResult) error {
type TempCredential (line 36) | type TempCredential struct
type payload (line 42) | type payload struct
function renameKeyName (line 146) | func renameKeyName(uuid string, container models.Container) string {
FILE: saas/uuid.go
function EnsureUUIDs (line 20) | func EnsureUUIDs(servers map[string]config.ServerInfo, path string, scan...
function ensure (line 32) | func ensure(servers map[string]config.ServerInfo, scanResults models.Sca...
function writeToFile (line 98) | func writeToFile(cnf config.Config, path string) error {
function cleanForTOMLEncoding (line 149) | func cleanForTOMLEncoding(server config.ServerInfo, def config.ServerInf...
FILE: saas/uuid_test.go
function mockGenerateFunc (line 11) | func mockGenerateFunc() (string, error) {
function Test_ensure (line 15) | func Test_ensure(t *testing.T) {
FILE: scanner/alma.go
type alma (line 10) | type alma struct
method checkScanMode (line 32) | func (o *alma) checkScanMode() error {
method checkDeps (line 36) | func (o *alma) checkDeps() error {
method depsFast (line 46) | func (o *alma) depsFast() []string {
method depsFastRoot (line 56) | func (o *alma) depsFastRoot() []string {
method depsDeep (line 66) | func (o *alma) depsDeep() []string {
method checkIfSudoNoPasswd (line 70) | func (o *alma) checkIfSudoNoPasswd() error {
method sudoNoPasswdCmdsFast (line 80) | func (o *alma) sudoNoPasswdCmdsFast() []cmd {
method sudoNoPasswdCmdsFastRoot (line 84) | func (o *alma) sudoNoPasswdCmdsFastRoot() []cmd {
method sudoNoPasswdCmdsDeep (line 102) | func (o *alma) sudoNoPasswdCmdsDeep() []cmd {
function newAlma (line 15) | func newAlma(c config.ServerInfo) *alma {
type rootPrivAlma (line 106) | type rootPrivAlma struct
method repoquery (line 108) | func (o rootPrivAlma) repoquery() bool {
method yumMakeCache (line 112) | func (o rootPrivAlma) yumMakeCache() bool {
method yumPS (line 116) | func (o rootPrivAlma) yumPS() bool {
FILE: scanner/alpine.go
type alpine (line 17) | type alpine struct
method checkScanMode (line 50) | func (o *alpine) checkScanMode() error {
method checkDeps (line 54) | func (o *alpine) checkDeps() error {
method checkIfSudoNoPasswd (line 59) | func (o *alpine) checkIfSudoNoPasswd() error {
method apkUpdate (line 64) | func (o *alpine) apkUpdate() error {
method preCure (line 75) | func (o *alpine) preCure() error {
method postScan (line 84) | func (o *alpine) postScan() error {
method detectIPAddr (line 88) | func (o *alpine) detectIPAddr() (err error) {
method scanPackages (line 93) | func (o *alpine) scanPackages() error {
method scanInstalledPackages (line 130) | func (o *alpine) scanInstalledPackages() (models.Packages, models.SrcP...
method parseInstalledPackages (line 144) | func (o *alpine) parseInstalledPackages(stdout string) (models.Package...
method parseApkInstalledList (line 150) | func (o *alpine) parseApkInstalledList(stdout string) (models.Packages...
method parseApkIndex (line 191) | func (o *alpine) parseApkIndex(stdout string) (models.Packages, models...
method scanUpdatablePackages (line 251) | func (o *alpine) scanUpdatablePackages() (models.Packages, error) {
method parseApkUpgradableList (line 265) | func (o *alpine) parseApkUpgradableList(stdout string) (models.Package...
method parseApkVersion (line 293) | func (o *alpine) parseApkVersion(stdout string) (models.Packages, erro...
function newAlpine (line 22) | func newAlpine(c config.ServerInfo) *alpine {
function detectAlpine (line 38) | func detectAlpine(c config.ServerInfo) (bool, osTypeInterface) {
constant apkListPattern (line 148) | apkListPattern = `(?P<pkgver>.+) (?P<arch>.+) \{(?P<origin>.+)\} \(.+\) ...
FILE: scanner/alpine_test.go
function Test_alpine_parseApkInstalledList (line 11) | func Test_alpine_parseApkInstalledList(t *testing.T) {
function Test_alpine_parseApkIndex (line 80) | func Test_alpine_parseApkIndex(t *testing.T) {
function Test_alpine_parseApkUpgradableList (line 299) | func Test_alpine_parseApkUpgradableList(t *testing.T) {
function TestParseApkVersion (line 362) | func TestParseApkVersion(t *testing.T) {
FILE: scanner/amazon.go
type amazon (line 15) | type amazon struct
method checkScanMode (line 37) | func (o *amazon) checkScanMode() error {
method checkDeps (line 41) | func (o *amazon) checkDeps() error {
method depsFast (line 54) | func (o *amazon) depsFast() []string {
method depsFastRoot (line 70) | func (o *amazon) depsFastRoot() []string {
method depsDeep (line 82) | func (o *amazon) depsDeep() []string {
method checkIfSudoNoPasswd (line 86) | func (o *amazon) checkIfSudoNoPasswd() error {
method sudoNoPasswdCmdsFast (line 96) | func (o *amazon) sudoNoPasswdCmdsFast() []cmd {
method sudoNoPasswdCmdsFastRoot (line 100) | func (o *amazon) sudoNoPasswdCmdsFastRoot() []cmd {
method sudoNoPasswdCmdsDeep (line 111) | func (o *amazon) sudoNoPasswdCmdsDeep() []cmd {
function newAmazon (line 20) | func newAmazon(c config.ServerInfo) *amazon {
type rootPrivAmazon (line 115) | type rootPrivAmazon struct
method repoquery (line 117) | func (o rootPrivAmazon) repoquery() bool {
method yumMakeCache (line 121) | func (o rootPrivAmazon) yumMakeCache() bool {
method yumPS (line 125) | func (o rootPrivAmazon) yumPS() bool {
FILE: scanner/base.go
type base (line 81) | type base struct
method exec (line 110) | func (l *base) exec(cmd string, sudo bool) execResult {
method setServerInfo (line 114) | func (l *base) setServerInfo(c config.ServerInfo) {
method getServerInfo (line 118) | func (l *base) getServerInfo() config.ServerInfo {
method setDistro (line 122) | func (l *base) setDistro(fam, rel string) {
method getDistro (line 134) | func (l *base) getDistro() config.Distro {
method setPlatform (line 138) | func (l *base) setPlatform(p models.Platform) {
method getPlatform (line 142) | func (l *base) getPlatform() models.Platform {
method runningKernel (line 146) | func (l *base) runningKernel() (release, version string, err error) {
method allContainers (line 166) | func (l *base) allContainers() (containers []config.Container, err err...
method runningContainers (line 192) | func (l *base) runningContainers() (containers []config.Container, err...
method exitedContainers (line 218) | func (l *base) exitedContainers() (containers []config.Container, err ...
method dockerPs (line 244) | func (l *base) dockerPs(option string) (string, error) {
method lxdPs (line 253) | func (l *base) lxdPs(option string) (string, error) {
method lxcPs (line 262) | func (l *base) lxcPs(option string) (string, error) {
method parseDockerPs (line 271) | func (l *base) parseDockerPs(stdout string) (containers []config.Conta...
method parseLxdPs (line 290) | func (l *base) parseLxdPs(stdout string) (containers []config.Containe...
method parseLxcPs (line 311) | func (l *base) parseLxcPs(stdout string) (containers []config.Containe...
method ip (line 327) | func (l *base) ip() ([]string, []string, error) {
method parseIP (line 341) | func (l *base) parseIP(stdout string) (ipv4Addrs []string, ipv6Addrs [...
method parseIfconfig (line 365) | func (l *base) parseIfconfig(stdout string) (ipv4Addrs []string, ipv6A...
method detectPlatform (line 389) | func (l *base) detectPlatform() {
method detectDeepSecurity (line 413) | func (l *base) detectDeepSecurity() (string, error) {
method detectIPS (line 429) | func (l *base) detectIPS() {
method detectRunningOnAws (line 439) | func (l *base) detectRunningOnAws() (ok bool, instanceID string, err e...
method isAwsInstanceID (line 501) | func (l *base) isAwsInstanceID(str string) bool {
method convertToModel (line 505) | func (l *base) convertToModel() models.ScanResult {
method setErrs (line 558) | func (l *base) setErrs(errs []error) {
method getErrs (line 562) | func (l *base) getErrs() []error {
method setLogger (line 566) | func (l *base) setLogger(logger logging.Logger) {
method detectInitSystem (line 577) | func (l *base) detectInitSystem() (string, error) {
method detectServiceName (line 609) | func (l *base) detectServiceName(pid string) (string, error) {
method parseSystemctlStatus (line 618) | func (l *base) parseSystemctlStatus(stdout string) string {
method scanLibraries (line 631) | func (l *base) scanLibraries() (err error) {
method buildWpCliCmd (line 920) | func (l *base) buildWpCliCmd(wpCliArgs string, suppressStderr bool, sh...
method scanWordPress (line 939) | func (l *base) scanWordPress() error {
method detectShell (line 969) | func (l *base) detectShell() (string, error) {
method detectWordPress (line 995) | func (l *base) detectWordPress(shell string) (*models.WordPressPackage...
method detectWpCore (line 1023) | func (l *base) detectWpCore(shell string) (string, error) {
method detectWpThemes (line 1033) | func (l *base) detectWpThemes(shell string) ([]models.WpPackage, error) {
method detectWpPlugins (line 1051) | func (l *base) detectWpPlugins(shell string) ([]models.WpPackage, erro...
method scanPorts (line 1068) | func (l *base) scanPorts() (err error) {
method detectScanDest (line 1080) | func (l *base) detectScanDest() map[string][]string {
method execPortsScan (line 1122) | func (l *base) execPortsScan(scanDestIPPorts map[string][]string) ([]s...
method execNativePortScan (line 1139) | func (l *base) execNativePortScan(scanDestIPPorts map[string][]string)...
method execExternalPortScan (line 1184) | func (l *base) execExternalPortScan(scanDestIPPorts map[string][]strin...
method setScanTechniques (line 1279) | func (l *base) setScanTechniques() (func(*nmap.Scanner), error) {
method updatePortStatus (line 1313) | func (l *base) updatePortStatus(listenIPPorts []string) {
method findPortTestSuccessOn (line 1329) | func (l *base) findPortTestSuccessOn(listenIPPorts []string, searchLis...
method ps (line 1350) | func (l *base) ps() (string, error) {
method parsePs (line 1359) | func (l *base) parsePs(stdout string) map[string]string {
method lsProcExe (line 1373) | func (l *base) lsProcExe(pid string) (string, error) {
method parseLsProcExe (line 1382) | func (l *base) parseLsProcExe(stdout string) (string, error) {
method grepProcMap (line 1390) | func (l *base) grepProcMap(pid string) (string, error) {
method parseGrepProcMap (line 1399) | func (l *base) parseGrepProcMap(stdout string) (soPaths []string) {
method lsOfListen (line 1409) | func (l *base) lsOfListen() (string, error) {
method parseLsOf (line 1418) | func (l *base) parseLsOf(stdout string) map[string][]string {
method pkgPs (line 1436) | func (l *base) pkgPs(getOwnerPkgs func([]string) ([]string, error)) er...
type osPackages (line 96) | type osPackages struct
constant systemd (line 571) | systemd = "systemd"
constant upstart (line 572) | upstart = "upstart"
constant sysVinit (line 573) | sysVinit = "init"
function AnalyzeLibrary (line 753) | func AnalyzeLibrary(ctx context.Context, path string, contents []byte, f...
type DummyFileInfo (line 896) | type DummyFileInfo struct
method Name (line 903) | func (d *DummyFileInfo) Name() string { return d.name }
method Size (line 906) | func (d *DummyFileInfo) Size() int64 { return d.size }
method Mode (line 909) | func (d *DummyFileInfo) Mode() os.FileMode { return d.filemode }
method ModTime (line 912) | func (d *DummyFileInfo) ModTime() time.Time { return time.Now() }
method IsDir (line 915) | func (d *DummyFileInfo) IsDir() bool { return false }
method Sys (line 918) | func (d *DummyFileInfo) Sys() any { return nil }
function nativeScanPort (line 1165) | func nativeScanPort(scanDest string) (bool, error) {
function formatNmapOptionsToString (line 1262) | func formatNmapOptionsToString(conf *config.PortScanConf) string {
FILE: scanner/base_test.go
function TestParseDockerPs (line 28) | func TestParseDockerPs(t *testing.T) {
function TestParseLxdPs (line 62) | func TestParseLxdPs(t *testing.T) {
function TestParseIp (line 99) | func TestParseIp(t *testing.T) {
function TestParseIfconfig (line 129) | func TestParseIfconfig(t *testing.T) {
function TestIsAwsInstanceID (line 168) | func TestIsAwsInstanceID(t *testing.T) {
function TestParseSystemctlStatus (line 190) | func TestParseSystemctlStatus(t *testing.T) {
function Test_base_parseLsProcExe (line 222) | func Test_base_parseLsProcExe(t *testing.T) {
function Test_base_parseGrepProcMap (line 256) | func Test_base_parseGrepProcMap(t *testing.T) {
function Test_base_parseLsOf (line 291) | func Test_base_parseLsOf(t *testing.T) {
function Test_detectScanDest (line 353) | func Test_detectScanDest(t *testing.T) {
function Test_updatePortStatus (line 439) | func Test_updatePortStatus(t *testing.T) {
function Test_findPortScanSuccessOn (line 519) | func Test_findPortScanSuccessOn(t *testing.T) {
FILE: scanner/centos.go
type centos (line 10) | type centos struct
method checkScanMode (line 32) | func (o *centos) checkScanMode() error {
method checkDeps (line 36) | func (o *centos) checkDeps() error {
method depsFast (line 46) | func (o *centos) depsFast() []string {
method depsFastRoot (line 56) | func (o *centos) depsFastRoot() []string {
method depsDeep (line 66) | func (o *centos) depsDeep() []string {
method checkIfSudoNoPasswd (line 70) | func (o *centos) checkIfSudoNoPasswd() error {
method sudoNoPasswdCmdsFast (line 80) | func (o *centos) sudoNoPasswdCmdsFast() []cmd {
method sudoNoPasswdCmdsFastRoot (line 84) | func (o *centos) sudoNoPasswdCmdsFastRoot() []cmd {
method sudoNoPasswdCmdsDeep (line 100) | func (o *centos) sudoNoPasswdCmdsDeep() []cmd {
function newCentOS (line 15) | func newCentOS(c config.ServerInfo) *centos {
type rootPrivCentos (line 104) | type rootPrivCentos struct
method repoquery (line 106) | func (o rootPrivCentos) repoquery() bool {
method yumMakeCache (line 110) | func (o rootPrivCentos) yumMakeCache() bool {
method yumPS (line 114) | func (o rootPrivCentos) yumPS() bool {
FILE: scanner/debian.go
type debian (line 25) | type debian struct
method checkScanMode (line 121) | func (o *debian) checkScanMode() error {
method checkIfSudoNoPasswd (line 125) | func (o *debian) checkIfSudoNoPasswd() error {
method checkDeps (line 175) | func (o *debian) checkDeps() error {
method preCure (line 240) | func (o *debian) preCure() error {
method postScan (line 249) | func (o *debian) postScan() error {
method detectIPAddr (line 268) | func (o *debian) detectIPAddr() (err error) {
method scanPackages (line 273) | func (o *debian) scanPackages() error {
method rebootRequired (line 330) | func (o *debian) rebootRequired() (bool, error) {
method scanInstalledPackages (line 344) | func (o *debian) scanInstalledPackages() (models.Packages, models.Pack...
method parseInstalledPackages (line 386) | func (o *debian) parseInstalledPackages(stdout string) (models.Package...
method parseScannedPackagesLine (line 489) | func (o *debian) parseScannedPackagesLine(line string) (name, status, ...
method aptGetUpdate (line 520) | func (o *debian) aptGetUpdate() error {
method grepRaspbianPackages (line 529) | func (o *debian) grepRaspbianPackages(updatables models.Packages) mode...
method scanUnsecurePackages (line 540) | func (o *debian) scanUnsecurePackages(updatable models.Packages) (mode...
method ensureChangelogCache (line 580) | func (o *debian) ensureChangelogCache(current cache.Meta) (*cache.Meta...
method fillCandidateVersion (line 617) | func (o *debian) fillCandidateVersion(updatables models.Packages) (err...
method getUpdatablePackNames (line 644) | func (o *debian) getUpdatablePackNames() (packNames []string, err erro...
method parseAptGetUpgrade (line 655) | func (o *debian) parseAptGetUpgrade(stdout string) (updatableNames []s...
method makeTempChangelogDir (line 696) | func (o *debian) makeTempChangelogDir() (string, error) {
method deleteTempChangelogDir (line 719) | func (o *debian) deleteTempChangelogDir(tmpClogPath string) error {
method scanChangelogs (line 737) | func (o *debian) scanChangelogs(updatablePacks models.Packages, meta *...
method getChangelogCache (line 841) | func (o *debian) getChangelogCache(meta *cache.Meta, pack models.Packa...
method fetchParseChangelog (line 869) | func (o *debian) fetchParseChangelog(pack models.Package, tmpClogPath ...
method getChangelogPath (line 910) | func (o *debian) getChangelogPath(packName, tmpClogPath string) (strin...
method getCveIDsFromChangelog (line 968) | func (o *debian) getCveIDsFromChangelog(
method parseChangelog (line 1031) | func (o *debian) parseChangelog(changelog, name, ver string, confidenc...
method splitAptCachePolicy (line 1107) | func (o *debian) splitAptCachePolicy(stdout string) map[string]string {
method parseAptCachePolicy (line 1137) | func (o *debian) parseAptCachePolicy(stdout, name string) (packCandida...
method checkrestart (line 1172) | func (o *debian) checkrestart() error {
method parseCheckRestart (line 1238) | func (o *debian) parseCheckRestart(stdout string) (models.Packages, []...
method getOwnerPkgs (line 1309) | func (o *debian) getOwnerPkgs(paths []string) (pkgNames []string, err ...
method parseGetPkgName (line 1318) | func (o *debian) parseGetPkgName(stdout string) (pkgNames []string) {
function newDebian (line 30) | func newDebian(c config.ServerInfo) *debian {
function detectDebian (line 46) | func detectDebian(c config.ServerInfo) (bool, osTypeInterface) {
function trim (line 117) | func trim(str string) string {
type dep (line 168) | type dep struct
constant dpkgQuery (line 342) | dpkgQuery = `dpkg-query -W -f="\${binary:Package},\${db:Status-Abbrev},\...
function generateSuffix (line 711) | func generateSuffix() (string, error) {
type DetectedCveID (line 732) | type DetectedCveID struct
type packCandidateVer (line 1129) | type packCandidateVer struct
FILE: scanner/debian_test.go
function TestGetCveIDsFromChangelog (line 21) | func TestGetCveIDsFromChangelog(t *testing.T) {
function TestGetUpdatablePackNames (line 243) | func TestGetUpdatablePackNames(t *testing.T) {
function TestGetChangelogCache (line 399) | func TestGetChangelogCache(t *testing.T) {
function TestSplitAptCachePolicy (line 459) | func TestSplitAptCachePolicy(t *testing.T) {
function TestParseAptCachePolicy (line 490) | func TestParseAptCachePolicy(t *testing.T) {
function TestParseCheckRestart (line 596) | func TestParseCheckRestart(t *testing.T) {
function Test_debian_parseGetPkgName (line 804) | func Test_debian_parseGetPkgName(t *testing.T) {
function TestParseChangelog (line 839) | func TestParseChangelog(t *testing.T) {
function Test_debian_parseInstalledPackages (line 957) | func Test_debian_parseInstalledPackages(t *testing.T) {
FILE: scanner/executil.go
type execResult (line 28) | type execResult struct
method String (line 40) | func (s execResult) String() string {
method isSuccess (line 53) | func (s execResult) isSuccess(expectedStatusCodes ...int) bool {
constant sudo (line 67) | sudo = true
constant noSudo (line 70) | noSudo = false
function parallelExec (line 73) | func parallelExec(fn func(osTypeInterface) error, timeoutSec ...int) {
function exec (line 140) | func exec(c config.ServerInfo, cmd string, sudo bool, log ...logging.Log...
function isLocalExec (line 154) | func isLocalExec(port, host string) bool {
function localExec (line 158) | func localExec(c config.ServerInfo, cmdstr string, sudo bool) (result ex...
function sshExecExternal (line 187) | func sshExecExternal(c config.ServerInfo, cmdstr string, sudo bool) (res...
function getSSHLogger (line 281) | func getSSHLogger(log ...logging.Logger) logging.Logger {
function dockerShell (line 288) | func dockerShell(family string) string {
function decorateCmd (line 298) | func decorateCmd(c config.ServerInfo, cmd string, sudo bool) string {
function toUTF8 (line 334) | func toUTF8(s string) string {
FILE: scanner/executil_test.go
function TestDecorateCmd (line 9) | func TestDecorateCmd(t *testing.T) {
FILE: scanner/fedora.go
type fedora (line 10) | type fedora struct
method checkScanMode (line 32) | func (o *fedora) checkScanMode() error {
method checkDeps (line 36) | func (o *fedora) checkDeps() error {
method depsFast (line 46) | func (o *fedora) depsFast() []string {
method depsFastRoot (line 55) | func (o *fedora) depsFastRoot() []string {
method depsDeep (line 64) | func (o *fedora) depsDeep() []string {
method checkIfSudoNoPasswd (line 68) | func (o *fedora) checkIfSudoNoPasswd() error {
method sudoNoPasswdCmdsFast (line 78) | func (o *fedora) sudoNoPasswdCmdsFast() []cmd {
method sudoNoPasswdCmdsFastRoot (line 82) | func (o *fedora) sudoNoPasswdCmdsFastRoot() []cmd {
method sudoNoPasswdCmdsDeep (line 100) | func (o *fedora) sudoNoPasswdCmdsDeep() []cmd {
function newFedora (line 15) | func newFedora(c config.ServerInfo) *fedora {
type rootPrivFedora (line 104) | type rootPrivFedora struct
method repoquery (line 106) | func (o rootPrivFedora) repoquery() bool {
method yumMakeCache (line 110) | func (o rootPrivFedora) yumMakeCache() bool {
method yumPS (line 114) | func (o rootPrivFedora) yumPS() bool {
FILE: scanner/freebsd.go
type bsd (line 18) | type bsd struct
method checkScanMode (line 56) | func (o *bsd) checkScanMode() error {
method checkIfSudoNoPasswd (line 63) | func (o *bsd) checkIfSudoNoPasswd() error {
method checkDeps (line 69) | func (o *bsd) checkDeps() error {
method preCure (line 74) | func (o *bsd) preCure() error {
method postScan (line 83) | func (o *bsd) postScan() error {
method detectIPAddr (line 87) | func (o *bsd) detectIPAddr() (err error) {
method scanPackages (line 96) | func (o *bsd) scanPackages() error {
method parseInstalledPackages (line 133) | func (o *bsd) parseInstalledPackages(string) (models.Packages, models....
method rebootRequired (line 137) | func (o *bsd) rebootRequired() (bool, error) {
method scanInstalledPackages (line 145) | func (o *bsd) scanInstalledPackages() (models.Packages, error) {
method scanUnsecurePackages (line 164) | func (o *bsd) scanUnsecurePackages() (models.VulnInfos, error) {
method parsePkgInfo (line 241) | func (o *bsd) parsePkgInfo(stdout string) models.Packages {
method parsePkgVersion (line 262) | func (o *bsd) parsePkgVersion(stdout string) models.Packages {
method splitIntoBlocks (line 310) | func (o *bsd) splitIntoBlocks(stdout string) (blocks []string) {
method parseBlock (line 330) | func (o *bsd) parseBlock(block string) (packName string, cveIDs []stri...
function newBsd (line 23) | func newBsd(c config.ServerInfo) *bsd {
function detectFreebsd (line 38) | func detectFreebsd(c config.ServerInfo) (bool, osTypeInterface) {
type vulnIDCveIDs (line 300) | type vulnIDCveIDs struct
type pkgAuditResult (line 305) | type pkgAuditResult struct
FILE: scanner/freebsd_test.go
function TestParsePkgVersion (line 12) | func TestParsePkgVersion(t *testing.T) {
function TestSplitIntoBlocks (line 65) | func TestSplitIntoBlocks(t *testing.T) {
function TestParseBlock (line 127) | func TestParseBlock(t *testing.T) {
function TestParsePkgInfo (line 222) | func TestParsePkgInfo(t *testing.T) {
FILE: scanner/library.go
function convertLibWithScanner (line 12) | func convertLibWithScanner(apps []ftypes.Application) ([]models.LibraryS...
function newPURL (line 35) | func newPURL(pkgType ftypes.TargetType, metadata types.Metadata, pkg fty...
FILE: scanner/library_test.go
function Test_convertLibWithScanner (line 11) | func Test_convertLibWithScanner(t *testing.T) {
FILE: scanner/macos.go
type macos (line 18) | type macos struct
method checkScanMode (line 87) | func (o *macos) checkScanMode() error {
method checkIfSudoNoPasswd (line 91) | func (o *macos) checkIfSudoNoPasswd() error {
method checkDeps (line 95) | func (o *macos) checkDeps() error {
method preCure (line 99) | func (o *macos) preCure() error {
method detectIPAddr (line 107) | func (o *macos) detectIPAddr() (err error) {
method postScan (line 116) | func (o *macos) postScan() error {
method scanPackages (line 120) | func (o *macos) scanPackages() error {
method scanInstalledPackages (line 143) | func (o *macos) scanInstalledPackages() (models.Packages, error) {
method parseInstalledPackages (line 183) | func (o *macos) parseInstalledPackages(stdout string) (models.Packages...
function newMacOS (line 22) | func newMacOS(c config.ServerInfo) *macos {
function detectMacOS (line 36) | func detectMacOS(c config.ServerInfo) (bool, osTypeInterface) {
function parseSWVers (line 50) | func parseSWVers(stdout string) (string, string, error) {
FILE: scanner/macos_test.go
function Test_parseSWVers (line 11) | func Test_parseSWVers(t *testing.T) {
function Test_macos_parseInstalledPackages (line 80) | func Test_macos_parseInstalledPackages(t *testing.T) {
FILE: scanner/oracle.go
type oracle (line 10) | type oracle struct
method checkScanMode (line 32) | func (o *oracle) checkScanMode() error {
method checkDeps (line 36) | func (o *oracle) checkDeps() error {
method depsFast (line 46) | func (o *oracle) depsFast() []string {
method depsFastRoot (line 54) | func (o *oracle) depsFastRoot() []string {
method depsDeep (line 58) | func (o *oracle) depsDeep() []string {
method checkIfSudoNoPasswd (line 62) | func (o *oracle) checkIfSudoNoPasswd() error {
method sudoNoPasswdCmdsFast (line 72) | func (o *oracle) sudoNoPasswdCmdsFast() []cmd {
method sudoNoPasswdCmdsFastRoot (line 76) | func (o *oracle) sudoNoPasswdCmdsFastRoot() []cmd {
method sudoNoPasswdCmdsDeep (line 93) | func (o *oracle) sudoNoPasswdCmdsDeep() []cmd {
function newOracle (line 15) | func newOracle(c config.ServerInfo) *oracle {
type rootPrivOracle (line 97) | type rootPrivOracle struct
method repoquery (line 99) | func (o rootPrivOracle) repoquery() bool {
method yumMakeCache (line 103) | func (o rootPrivOracle) yumMakeCache() bool {
method yumPS (line 107) | func (o rootPrivOracle) yumPS() bool {
FILE: scanner/pseudo.go
type pseudo (line 19) | type pseudo struct
method checkScanMode (line 46) | func (o *pseudo) checkScanMode() error {
method checkIfSudoNoPasswd (line 50) | func (o *pseudo) checkIfSudoNoPasswd() error {
method checkDeps (line 54) | func (o *pseudo) checkDeps() error {
method preCure (line 58) | func (o *pseudo) preCure() error {
method postScan (line 62) | func (o *pseudo) postScan() error {
method scanPackages (line 66) | func (o *pseudo) scanPackages() error {
method parseInstalledPackages (line 70) | func (o *pseudo) parseInstalledPackages(string) (models.Packages, mode...
method detectPlatform (line 74) | func (o *pseudo) detectPlatform() {
method scanLibraries (line 78) | func (o *pseudo) scanLibraries() (err error) {
method cleanPath (line 148) | func (o *pseudo) cleanPath(path string) string {
function detectPseudo (line 23) | func detectPseudo(c config.ServerInfo) (itsMe bool, pseudo osTypeInterfa...
function newPseudo (line 32) | func newPseudo(c config.ServerInfo) *pseudo {
FILE: scanner/redhatbase.go
function detectRedhat (line 23) | func detectRedhat(c config.ServerInfo) (bool, osTypeInterface) {
type redhatBase (line 338) | type redhatBase struct
method execCheckIfSudoNoPasswd (line 356) | func (o *redhatBase) execCheckIfSudoNoPasswd(cmds []cmd) error {
method execCheckDeps (line 370) | func (o *redhatBase) execCheckDeps(packNames []string) error {
method preCure (line 382) | func (o *redhatBase) preCure() error {
method postScan (line 391) | func (o *redhatBase) postScan() error {
method detectIPAddr (line 412) | func (o *redhatBase) detectIPAddr() (err error) {
method scanPackages (line 417) | func (o *redhatBase) scanPackages() (err error) {
method rebootRequired (line 449) | func (o *redhatBase) rebootRequired(fn func(s string) execResult) (boo...
method scanInstalledPackages (line 468) | func (o *redhatBase) scanInstalledPackages() (models.Packages, models....
method parseInstalledPackages (line 504) | func (o *redhatBase) parseInstalledPackages(stdout string) (models.Pac...
method parseInstalledPackagesLine (line 577) | func (o *redhatBase) parseInstalledPackagesLine(line string) (*models....
method parseInstalledPackagesLineFromRepoquery (line 639) | func (o *redhatBase) parseInstalledPackagesLineFromRepoquery(line stri...
method parseRpmQfLine (line 747) | func (o *redhatBase) parseRpmQfLine(line string) (pkg *models.Package,...
method yumMakeCache (line 761) | func (o *redhatBase) yumMakeCache() error {
method scanUpdatablePackages (line 770) | func (o *redhatBase) scanUpdatablePackages() (models.Packages, error) {
method parseUpdatablePacksLines (line 802) | func (o *redhatBase) parseUpdatablePacksLines(stdout string) (models.P...
method parseUpdatablePacksLine (line 816) | func (o *redhatBase) parseUpdatablePacksLine(line string) (*models.Pac...
method isExecYumPS (line 851) | func (o *redhatBase) isExecYumPS() bool {
method isExecNeedsRestarting (line 859) | func (o *redhatBase) isExecNeedsRestarting() bool {
method needsRestarting (line 900) | func (o *redhatBase) needsRestarting() error {
method parseNeedsRestarting (line 940) | func (o *redhatBase) parseNeedsRestarting(stdout string) (procs []mode...
method procPathToFQPN (line 981) | func (o *redhatBase) procPathToFQPN(execCommand string) (string, error) {
method getOwnerPkgs (line 998) | func (o *redhatBase) getOwnerPkgs(paths []string) (names []string, _ e...
method rpmQa (line 1026) | func (o *redhatBase) rpmQa() string {
method rpmQf (line 1067) | func (o *redhatBase) rpmQf() string {
type rootPriv (line 343) | type rootPriv interface
type cmd (line 349) | type cmd struct
function splitFileName (line 710) | func splitFileName(filename string) (name, ver, rel, epoch, arch string,...
FILE: scanner/redhatbase_test.go
function Test_redhatBase_parseInstalledPackages (line 13) | func Test_redhatBase_parseInstalledPackages(t *testing.T) {
function Test_redhatBase_parseInstalledPackagesLine (line 321) | func Test_redhatBase_parseInstalledPackagesLine(t *testing.T) {
function Test_redhatBase_parseInstalledPackagesLineFromRepoquery (line 517) | func Test_redhatBase_parseInstalledPackagesLineFromRepoquery(t *testing....
function Test_redhatBase_parseUpdatablePacksLine (line 597) | func Test_redhatBase_parseUpdatablePacksLine(t *testing.T) {
function Test_redhatBase_parseUpdatablePacksLines (line 706) | func Test_redhatBase_parseUpdatablePacksLines(t *testing.T) {
function TestParseNeedsRestarting (line 847) | func TestParseNeedsRestarting(t *testing.T) {
function Test_redhatBase_parseRpmQfLine (line 882) | func Test_redhatBase_parseRpmQfLine(t *testing.T) {
function Test_redhatBase_rebootRequired (line 965) | func Test_redhatBase_rebootRequired(t *testing.T) {
FILE: scanner/rhel.go
type rhel (line 11) | type rhel struct
method checkScanMode (line 33) | func (o *rhel) checkScanMode() error {
method checkDeps (line 37) | func (o *rhel) checkDeps() error {
method depsFast (line 50) | func (o *rhel) depsFast() []string {
method depsFastRoot (line 54) | func (o *rhel) depsFastRoot() []string {
method depsDeep (line 64) | func (o *rhel) depsDeep() []string {
method checkIfSudoNoPasswd (line 68) | func (o *rhel) checkIfSudoNoPasswd() error {
method sudoNoPasswdCmdsFast (line 78) | func (o *rhel) sudoNoPasswdCmdsFast() []cmd {
method sudoNoPasswdCmdsFastRoot (line 82) | func (o *rhel) sudoNoPasswdCmdsFastRoot() []cmd {
method sudoNoPasswdCmdsDeep (line 100) | func (o *rhel) sudoNoPasswdCmdsDeep() []cmd {
function newRHEL (line 16) | func newRHEL(c config.ServerInfo) *rhel {
type rootPrivRHEL (line 104) | type rootPrivRHEL struct
method repoquery (line 106) | func (o rootPrivRHEL) repoquery() bool {
method yumMakeCache (line 110) | func (o rootPrivRHEL) yumMakeCache() bool {
method yumPS (line 114) | func (o rootPrivRHEL) yumPS() bool {
FILE: scanner/rocky.go
type rocky (line 10) | type rocky struct
method checkScanMode (line 32) | func (o *rocky) checkScanMode() error {
method checkDeps (line 36) | func (o *rocky) checkDeps() error {
method depsFast (line 46) | func (o *rocky) depsFast() []string {
method depsFastRoot (line 56) | func (o *rocky) depsFastRoot() []string {
method depsDeep (line 66) | func (o *rocky) depsDeep() []string {
method checkIfSudoNoPasswd (line 70) | func (o *rocky) checkIfSudoNoPasswd() error {
method sudoNoPasswdCmdsFast (line 80) | func (o *rocky) sudoNoPasswdCmdsFast() []cmd {
method sudoNoPasswdCmdsFastRoot (line 84) | func (o *rocky) sudoNoPasswdCmdsFastRoot() []cmd {
method sudoNoPasswdCmdsDeep (line 102) | func (o *rocky) sudoNoPasswdCmdsDeep() []cmd {
function newRocky (line 15) | func newRocky(c config.ServerInfo) *rocky {
type rootPrivRocky (line 106) | type rootPrivRocky struct
method repoquery (line 108) | func (o rootPrivRocky) repoquery() bool {
method yumMakeCache (line 112) | func (o rootPrivRocky) yumMakeCache() bool {
method yumPS (line 116) | func (o rootPrivRocky) yumPS() bool {
FILE: scanner/scanner.go
constant scannedViaRemote (line 28) | scannedViaRemote = "remote"
constant scannedViaLocal (line 29) | scannedViaLocal = "local"
constant scannedViaPseudo (line 30) | scannedViaPseudo = "pseudo"
type osTypeInterface (line 42) | type osTypeInterface interface
type Scanner (line 75) | type Scanner struct
method Scan (line 90) | func (s Scanner) Scan() error {
method Configtest (line 116) | func (s Scanner) Configtest() error {
method initServers (line 299) | func (s Scanner) initServers() error {
method detectServerOSes (line 329) | func (s Scanner) detectServerOSes() (servers, errServers []osTypeInter...
method detectContainerOSes (line 634) | func (s Scanner) detectContainerOSes(hosts []osTypeInterface) (actives...
method detectContainerOSesOnServer (line 672) | func (s Scanner) detectContainerOSesOnServer(containerHost osTypeInter...
method detectOS (line 755) | func (s Scanner) detectOS(c config.ServerInfo) osTypeInterface {
method checkScanModes (line 828) | func (s Scanner) checkScanModes() error {
method checkDependencies (line 839) | func (s Scanner) checkDependencies() {
method checkIfSudoNoPasswd (line 846) | func (s Scanner) checkIfSudoNoPasswd() {
method detectPlatform (line 853) | func (s Scanner) detectPlatform() {
method detectIPS (line 880) | func (s Scanner) detectIPS() {
method execScan (line 899) | func (s Scanner) execScan() error {
method setupChangelogCache (line 931) | func (s Scanner) setupChangelogCache() error {
method getScanResults (line 954) | func (s Scanner) getScanResults(scannedAt time.Time) (results models.S...
function ViaHTTP (line 155) | func ViaHTTP(header http.Header, body string, toLocalFile bool) (models....
function ParseInstalledPkgs (line 256) | func ParseInstalledPkgs(distro config.Distro, kernel models.Kernel, pkgL...
function validateSSHConfig (line 385) | func validateSSHConfig(c *config.ServerInfo) error {
function lookpath (line 491) | func lookpath(family, file string) (string, error) {
function buildSSHBaseCmd (line 504) | func buildSSHBaseCmd(sshBinaryPath string, c *config.ServerInfo, options...
function buildSSHConfigCmd (line 528) | func buildSSHConfigCmd(sshBinaryPath string, c *config.ServerInfo) string {
function buildSSHKeyScanCmd (line 532) | func buildSSHKeyScanCmd(sshKeyscanBinaryPath, port, knownHosts string, s...
type sshConfiguration (line 543) | type sshConfiguration struct
function parseSSHConfiguration (line 556) | func parseSSHConfiguration(stdout string) sshConfiguration {
function normalizeHomeDirPathForWindows (line 593) | func normalizeHomeDirPathForWindows(userKnownHost string) string {
function parseSSHScan (line 598) | func parseSSHScan(stdout string) map[string]string {
function parseSSHKeygen (line 612) | func parseSSHKeygen(stdout string) (string, string, error) {
function testFirstSSHConnection (line 808) | func testFirstSSHConnection(c config.ServerInfo) error {
FILE: scanner/scanner_test.go
function TestViaHTTP (line 13) | func TestViaHTTP(t *testing.T) {
function TestParseSSHConfiguration (line 249) | func TestParseSSHConfiguration(t *testing.T) {
function TestParseSSHScan (line 361) | func TestParseSSHScan(t *testing.T) {
function TestNormalizedForWindows (line 391) | func TestNormalizedForWindows(t *testing.T) {
function TestParseSSHKeygen (line 417) | func TestParseSSHKeygen(t *testing.T) {
FILE: scanner/suse.go
type suse (line 18) | type suse struct
method parseOSRelease (line 85) | func (o *suse) parseOSRelease(content string) (name string, ver string) {
method checkScanMode (line 108) | func (o *suse) checkScanMode() error {
method checkDeps (line 112) | func (o *suse) checkDeps() error {
method depsFast (line 125) | func (o *suse) depsFast() []string {
method depsFastRoot (line 129) | func (o *suse) depsFastRoot() []string {
method depsDeep (line 133) | func (o *suse) depsDeep() []string {
method checkIfSudoNoPasswd (line 137) | func (o *suse) checkIfSudoNoPasswd() error {
method sudoNoPasswdCmdsFast (line 147) | func (o *suse) sudoNoPasswdCmdsFast() []cmd {
method sudoNoPasswdCmdsDeep (line 151) | func (o *suse) sudoNoPasswdCmdsDeep() []cmd {
method sudoNoPasswdCmdsFastRoot (line 155) | func (o *suse) sudoNoPasswdCmdsFastRoot() []cmd {
method scanPackages (line 171) | func (o *suse) scanPackages() (err error) {
method rebootRequired (line 203) | func (o *suse) rebootRequired() (bool, error) {
method scanUpdatablePackages (line 214) | func (o *suse) scanUpdatablePackages() (models.Packages, error) {
method parseZypperLULines (line 228) | func (o *suse) parseZypperLULines(stdout string) (models.Packages, err...
method parseZypperLUOneLine (line 261) | func (o *suse) parseZypperLUOneLine(line string) (*models.Package, err...
method hasZypperColorOption (line 278) | func (o *suse) hasZypperColorOption() bool {
method postScan (line 284) | func (o *suse) postScan() error {
method needsRestarting (line 305) | func (o *suse) needsRestarting() error {
method parseNeedsRestarting (line 345) | func (o *suse) parseNeedsRestarting(stdout string) []models.NeedRestar...
function newSUSE (line 23) | func newSUSE(c config.ServerInfo) *suse {
function detectSUSE (line 40) | func detectSUSE(c config.ServerInfo) (bool, osTypeInterface) {
FILE: scanner/suse_test.go
function TestScanUpdatablePackages (line 14) | func TestScanUpdatablePackages(t *testing.T) {
function TestScanUpdatablePackage (line 102) | func TestScanUpdatablePackage(t *testing.T) {
function TestParseOSRelease (line 136) | func TestParseOSRelease(t *testing.T) {
FILE: scanner/trivy/jar/jar.go
function init (line 18) | func init() {
constant version (line 22) | version = 1
type javaLibraryAnalyzer (line 32) | type javaLibraryAnalyzer struct
method PostAnalyze (line 42) | func (a *javaLibraryAnalyzer) PostAnalyze(ctx context.Context, input a...
method Required (line 99) | func (a *javaLibraryAnalyzer) Required(filePath string, _ os.FileInfo)...
method Type (line 109) | func (a *javaLibraryAnalyzer) Type() analyzer.Type {
method Version (line 113) | func (a *javaLibraryAnalyzer) Version() int {
function newJavaLibraryAnalyzer (line 36) | func newJavaLibraryAnalyzer(options analyzer.AnalyzerOptions) (analyzer....
function toApplication (line 72) | func toApplication(rootFilePath string, libs []jarLibrary) *types.Applic...
FILE: scanner/trivy/jar/parse.go
type jarLibrary (line 26) | type jarLibrary struct
type properties (line 36) | type properties struct
method library (line 44) | func (p properties) library() jarLibrary {
method valid (line 53) | func (p properties) valid() bool {
method string (line 57) | func (p properties) string() string {
type parser (line 61) | type parser struct
method parse (line 90) | func (p *parser) parse(r xio.ReadSeekerAt) ([]jarLibrary, error) {
method parseArtifact (line 101) | func (p *parser) parseArtifact(filePath string, size int64, r xio.Read...
method parseInnerJar (line 166) | func (p *parser) parseInnerJar(zf *zip.File, rootPath string) ([]jarLi...
type option (line 66) | type option
function withFilePath (line 68) | func withFilePath(filePath string) option {
function withSize (line 74) | func withSize(size int64) option {
function newParser (line 80) | func newParser(opts ...option) *parser {
function isArtifact (line 200) | func isArtifact(name string) bool {
function parseFileName (line 208) | func parseFileName(filePath string, sha1 digest.Digest) properties {
function parsePomProperties (line 226) | func parsePomProperties(f *zip.File, filePath string) (properties, error) {
type manifest (line 255) | type manifest struct
method properties (line 318) | func (m manifest) properties(filePath string, sha1 digest.Digest) prop...
method determineGroupID (line 343) | func (m manifest) determineGroupID() (string, error) {
method determineArtifactID (line 366) | func (m manifest) determineArtifactID() (string, error) {
method determineVersion (line 381) | func (m manifest) determineVersion() (string, error) {
function parseManifest (line 268) | func parseManifest(f *zip.File) (manifest, error) {
function removeLibraryDuplicates (line 396) | func removeLibraryDuplicates(libs []jarLibrary) []jarLibrary {
FILE: scanner/unknownDistro.go
type unknown (line 6) | type unknown struct
method checkScanMode (line 10) | func (o *unknown) checkScanMode() error {
method checkIfSudoNoPasswd (line 14) | func (o *unknown) checkIfSudoNoPasswd() error {
method checkDeps (line 18) | func (o *unknown) checkDeps() error {
method preCure (line 22) | func (o *unknown) preCure() error {
method postScan (line 26) | func (o *unknown) postScan() error {
method scanPackages (line 30) | func (o *unknown) scanPackages() error {
method parseInstalledPackages (line 34) | func (o *unknown) parseInstalledPackages(string) (models.Packages, mod...
FILE: scanner/utils.go
function isRunningKernel (line 20) | func isRunningKernel(pack models.Package, family, release string, kernel...
function EnsureResultDir (line 96) | func EnsureResultDir(resultsDir string, scannedAt time.Time) (currentDir...
function writeScanResults (line 109) | func writeScanResults(jsonDir string, results models.ScanResults) error {
FILE: scanner/utils/filepath/unix/unix.go
constant Separator (line 13) | Separator = '/'
type lazybuf (line 15) | type lazybuf struct
method index (line 23) | func (b *lazybuf) index(i int) byte {
method append (line 30) | func (b *lazybuf) append(c byte) {
method string (line 43) | func (b *lazybuf) string() string {
function Clean (line 77) | func Clean(path string) string {
function postClean (line 152) | func postClean(_ *lazybuf) {}
function ToSlash (line 157) | func ToSlash(path string) string {
function FromSlash (line 170) | func FromSlash(path string) string {
function replaceStringByte (line 177) | func replaceStringByte(s string, before, after byte) string {
function Split (line 195) | func Split(path string) (dir, file string) {
function Ext (line 208) | func Ext(path string) string {
function Base (line 221) | func Base(path string) string {
function Dir (line 252) | func Dir(path string) string {
function VolumeName (line 270) | func VolumeName(path string) string {
function volumeNameLen (line 276) | func volumeNameLen(_ string) int {
function isPathSeparator (line 280) | func isPathSeparator(c uint8) bool {
function Join (line 291) | func Join(elem ...string) string {
function IsAbs (line 302) | func IsAbs(path string) bool {
FILE: scanner/utils/filepath/windows/windows.go
constant Separator (line 13) | Separator = '\\'
type lazybuf (line 15) | type lazybuf struct
method index (line 23) | func (b *lazybuf) index(i int) byte {
method append (line 30) | func (b *lazybuf) append(c byte) {
method prepend (line 43) | func (b *lazybuf) prepend(prefix ...byte) {
method string (line 48) | func (b *lazybuf) string() string {
function Clean (line 82) | func Clean(path string) string {
function postClean (line 159) | func postClean(out *lazybuf) {
function ToSlash (line 186) | func ToSlash(path string) string {
function FromSlash (line 199) | func FromSlash(path string) string {
function replaceStringByte (line 206) | func replaceStringByte(s string, before, after byte) string {
function Split (line 224) | func Split(path string) (dir, file string) {
function Ext (line 237) | func Ext(path string) string {
function Base (line 250) | func Base(path string) string {
function Dir (line 281) | func Dir(path string) string {
function VolumeName (line 299) | func VolumeName(path string) string {
function volumeNameLen (line 309) | func volumeNameLen(path string) int {
function pathHasPrefixFold (line 360) | func pathHasPrefixFold(s, prefix string) bool {
function toUpper (line 379) | func toUpper(c byte) byte {
function uncLen (line 389) | func uncLen(path string, prefixLen int) int {
function cutPath (line 403) | func cutPath(path string) (before, after string, found bool) {
function isPathSeparator (line 412) | func isPathSeparator(c uint8) bool {
function Join (line 423) | func Join(elem ...string) string {
function IsAbs (line 471) | func IsAbs(path string) bool {
FILE: scanner/utils_test.go
function Test_isRunningKernel (line 10) | func Test_isRunningKernel(t *testing.T) {
FILE: scanner/windows.go
type windows (line 27) | type windows struct
method translateCmd (line 154) | func (w *windows) translateCmd(cmd string) string {
method checkScanMode (line 1040) | func (w *windows) checkScanMode() error {
method checkIfSudoNoPasswd (line 1044) | func (w *windows) checkIfSudoNoPasswd() error {
method checkDeps (line 1048) | func (w *windows) checkDeps() error {
method preCure (line 1052) | func (w *windows) preCure() error {
method postScan (line 1060) | func (w *windows) postScan() error {
method detectIPAddr (line 1064) | func (w *windows) detectIPAddr() error {
method ip (line 1070) | func (w *windows) ip() ([]string, []string, error) {
method parseIP (line 1082) | func (w *windows) parseIP(stdout string) ([]string, []string, error) {
method scanPackages (line 1120) | func (w *windows) scanPackages() error {
method parseInstalledPackages (line 1162) | func (w *windows) parseInstalledPackages(stdout string) (models.Packag...
method parseRegistryPublishers (line 1215) | func (w *windows) parseRegistryPublishers(stdout string) (map[string]s...
method scanKBs (line 1254) | func (w *windows) scanKBs() (*models.WindowsKB, error) {
method parseGetHotfix (line 1353) | func (w *windows) parseGetHotfix(stdout string) ([]string, error) {
method parseGetPackageMSU (line 1377) | func (w *windows) parseGetPackageMSU(stdout string) ([]string, error) {
method parseWindowsUpdaterSearch (line 1405) | func (w *windows) parseWindowsUpdaterSearch(stdout string) ([]string, ...
method parseWindowsUpdateHistory (line 1424) | func (w *windows) parseWindowsUpdateHistory(stdout string) ([]string, ...
method detectPlatform (line 5276) | func (w *windows) detectPlatform() {
method detectRunningOnAws (line 5299) | func (w *windows) detectRunningOnAws() (bool, string, error) {
method scanLibraries (line 5340) | func (w *windows) scanLibraries() (err error) {
method cleanPath (line 5506) | func (w *windows) cleanPath(path string) string {
type osInfo (line 32) | type osInfo struct
function newWindows (line 43) | func newWindows(c config.ServerInfo) *windows {
function detectWindows (line 58) | func detectWindows(c config.ServerInfo) (bool, osTypeInterface) {
function parseSystemInfo (line 165) | func parseSystemInfo(stdout string) (osInfo, []string, error) {
function parseGetComputerInfo (line 239) | func parseGetComputerInfo(stdout string) (osInfo, error) {
function parseWmiObject (line 294) | func parseWmiObject(stdout string) (osInfo, error) {
function parseRegistry (line 513) | func parseRegistry(stdout string) (osInfo, error) {
function detectOSName (line 599) | func detectOSName(osInfo osInfo) (string, error) {
function detectOSNameFromOSInfo (line 607) | func detectOSNameFromOSInfo(osInfo osInfo) (string, error) {
function formatArch (line 830) | func formatArch(arch string) (string, error) {
type buildNumber (line 845) | type buildNumber struct
function formatNamebyBuild (line 1007) | func formatNamebyBuild(osType string, mybuild string) (string, error) {
function formatKernelVersion (line 1032) | func formatKernelVersion(osInfo osInfo) string {
type windowsRelease (line 1476) | type windowsRelease struct
type updateProgram (line 1481) | type updateProgram struct
function DetectKBsFromKernelVersion (line 5214) | func DetectKBsFromKernelVersion(release, kernelVersion string) (models.W...
FILE: scanner/windows_test.go
function Test_parseSystemInfo (line 12) | func Test_parseSystemInfo(t *testing.T) {
function Test_parseGetComputerInfo (line 218) | func Test_parseGetComputerInfo(t *testing.T) {
function Test_parseWmiObject (line 261) | func Test_parseWmiObject(t *testing.T) {
function Test_parseRegistry (line 308) | func Test_parseRegistry(t *testing.T) {
function Test_detectOSName (line 355) | func Test_detectOSName(t *testing.T) {
function Test_formatKernelVersion (line 559) | func Test_formatKernelVersion(t *testing.T) {
function Test_parseInstalledPackages (line 592) | func Test_parseInstalledPackages(t *testing.T) {
function Test_parseRegistryPublishers (line 697) | func Test_parseRegistryPublishers(t *testing.T) {
function Test_parseGetHotfix (line 780) | func Test_parseGetHotfix(t *testing.T) {
function Test_parseGetPackageMSU (line 818) | func Test_parseGetPackageMSU(t *testing.T) {
function Test_parseWindowsUpdaterSearch (line 858) | func Test_parseWindowsUpdaterSearch(t *testing.T) {
function Test_parseWindowsUpdateHistory (line 895) | func Test_parseWindowsUpdateHistory(t *testing.T) {
function Test_windows_detectKBsFromKernelVersion (line 946) | func Test_windows_detectKBsFromKernelVersion(t *testing.T) {
function Test_windows_parseIP (line 1034) | func Test_windows_parseIP(t *testing.T) {
FILE: server/server.go
type VulsHandler (line 24) | type VulsHandler struct
method ServeHTTP (line 29) | func (h VulsHandler) ServeHTTP(w http.ResponseWriter, req *http.Reques...
FILE: subcmds/configtest.go
type ConfigtestCmd (line 19) | type ConfigtestCmd struct
method Name (line 25) | func (*ConfigtestCmd) Name() string { return "configtest" }
method Synopsis (line 28) | func (*ConfigtestCmd) Synopsis() string { return "Test configuration" }
method Usage (line 31) | func (*ConfigtestCmd) Usage() string {
method SetFlags (line 48) | func (p *ConfigtestCmd) SetFlags(f *flag.FlagSet) {
method Execute (line 67) | func (p *ConfigtestCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...
FILE: subcmds/discover.go
type DiscoverCmd (line 20) | type DiscoverCmd struct
method Name (line 24) | func (*DiscoverCmd) Name() string { return "discover" }
method Synopsis (line 27) | func (*DiscoverCmd) Synopsis() string { return "Host discovery in the ...
method Usage (line 30) | func (*DiscoverCmd) Usage() string {
method SetFlags (line 38) | func (p *DiscoverCmd) SetFlags(_ *flag.FlagSet) {
method Execute (line 42) | func (p *DiscoverCmd) Execute(_ context.Context, f *flag.FlagSet, _ .....
function printConfigToml (line 83) | func printConfigToml(ips []string) (err error) {
FILE: subcmds/history.go
type HistoryCmd (line 18) | type HistoryCmd struct
method Name (line 21) | func (*HistoryCmd) Name() string { return "history" }
method Synopsis (line 24) | func (*HistoryCmd) Synopsis() string {
method Usage (line 29) | func (*HistoryCmd) Usage() string {
method SetFlags (line 37) | func (p *HistoryCmd) SetFlags(f *flag.FlagSet) {
method Execute (line 46) | func (p *HistoryCmd) Execute(_ context.Context, _ *flag.FlagSet, _ ......
FILE: subcmds/report.go
type ReportCmd (line 25) | type ReportCmd struct
method Name (line 52) | func (*ReportCmd) Name() string { return "report" }
method Synopsis (line 55) | func (*ReportCmd) Synopsis() string { return "Reporting" }
method Usage (line 58) | func (*ReportCmd) Usage() string {
method SetFlags (line 110) | func (p *ReportCmd) SetFlags(f *flag.FlagSet) {
method Execute (line 199) | func (p *ReportCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...a...
FILE: subcmds/report_windows.go
type ReportCmd (line 24) | type ReportCmd struct
method Name (line 50) | func (*ReportCmd) Name() string { return "report" }
method Synopsis (line 53) | func (*ReportCmd) Synopsis() string { return "Reporting" }
method Usage (line 56) | func (*ReportCmd) Usage() string {
method SetFlags (line 108) | func (p *ReportCmd) SetFlags(f *flag.FlagSet) {
method Execute (line 196) | func (p *ReportCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...a...
FILE: subcmds/saas.go
type SaaSCmd (line 20) | type SaaSCmd struct
method Name (line 26) | func (*SaaSCmd) Name() string { return "saas" }
method Synopsis (line 29) | func (*SaaSCmd) Synopsis() string { return "upload to FutureVuls" }
method Usage (line 32) | func (*SaaSCmd) Usage() string {
method SetFlags (line 47) | func (p *SaaSCmd) SetFlags(f *flag.FlagSet) {
method Execute (line 72) | func (p *SaaSCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...any...
FILE: subcmds/scan.go
type ScanCmd (line 21) | type ScanCmd struct
method Name (line 30) | func (*ScanCmd) Name() string { return "scan" }
method Synopsis (line 33) | func (*ScanCmd) Synopsis() string { return "Scan vulnerabilities" }
method Usage (line 36) | func (*ScanCmd) Usage() string {
method SetFlags (line 58) | func (p *ScanCmd) SetFlags(f *flag.FlagSet) {
method Execute (line 95) | func (p *ScanCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...any...
FILE: subcmds/server.go
type ServerCmd (line 22) | type ServerCmd struct
method Name (line 29) | func (*ServerCmd) Name() string { return "server" }
method Synopsis (line 32) | func (*ServerCmd) Synopsis() string { return "Server" }
method Usage (line 35) | func (*ServerCmd) Usage() string {
method SetFlags (line 57) | func (p *ServerCmd) SetFlags(f *flag.FlagSet) {
method Execute (line 94) | func (p *ServerCmd) Execute(_ context.Context, _ *flag.FlagSet, _ ...a...
FILE: subcmds/string_array_flag.go
type stringArrayFlag (line 5) | type stringArrayFlag struct
method String (line 9) | func (f *stringArrayFlag) String() string {
method Set (line 16) | func (f *stringArrayFlag) Set(value string) error {
FILE: subcmds/tui.go
type TuiCmd (line 24) | type TuiCmd struct
method Name (line 29) | func (*TuiCmd) Name() string { return "tui" }
method Synopsis (line 32) | func (*TuiCmd) Synopsis() string { return "Run Tui view to analyze vul...
method Usage (line 35) | func (*TuiCmd) Usage() string {
method SetFlags (line 64) | func (p *TuiCmd) SetFlags(f *flag.FlagSet) {
method Execute (line 124) | func (p *TuiCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...any)...
FILE: subcmds/util.go
function mkdirDotVuls (line 10) | func mkdirDotVuls() error {
FILE: tui/tui.go
function RunTui (line 33) | func RunTui(results models.ScanResults) subcommands.ExitStatus {
function keybindings (line 67) | func keybindings(g *gocui.Gui) (err error) {
function nextView (line 168) | func nextView(g *gocui.Gui, v *gocui.View) error {
function previousView (line 189) | func previousView(g *gocui.Gui, v *gocui.View) error {
function movable (line 210) | func movable(v *gocui.View, nextY int) (ok bool, yLimit int) {
function pageUpDownJumpCount (line 239) | func pageUpDownJumpCount(v *gocui.View) int {
function onMovingCursorRedrawView (line 253) | func onMovingCursorRedrawView(g *gocui.Gui, v *gocui.View) error {
function cursorDown (line 270) | func cursorDown(g *gocui.Gui, v *gocui.View) error {
function cursorMoveMiddle (line 298) | func cursorMoveMiddle(g *gocui.Gui, v *gocui.View) error {
function cursorPageDown (line 309) | func cursorPageDown(g *gocui.Gui, v *gocui.View) error {
function cursorUp (line 343) | func cursorUp(g *gocui.Gui, v *gocui.View) error {
function cursorPageUp (line 357) | func cursorPageUp(g *gocui.Gui, v *gocui.View) error {
function previousSummary (line 374) | func previousSummary(g *gocui.Gui, v *gocui.View) error {
function nextSummary (line 392) | func nextSummary(g *gocui.Gui, v *gocui.View) error {
function changeHost (line 410) | func changeHost(g *gocui.Gui, v *gocui.View) error {
function redrawDetail (line 446) | func redrawDetail(g *gocui.Gui) error {
function redrawChangelog (line 454) | func redrawChangelog(g *gocui.Gui) error {
function getLine (line 462) | func getLine(g *gocui.Gui, v *gocui.View) error {
function showMsg (line 486) | func showMsg(g *gocui.Gui, v *gocui.View) error {
function delMsg (line 511) | func delMsg(g *gocui.Gui, _ *gocui.View) error {
function quit (line 519) | func quit(_ *gocui.Gui, _ *gocui.View) error {
function layout (line 523) | func layout(g *gocui.Gui) error {
function debug (line 536) | func debug(g *gocui.Gui, str string) error {
function setSideLayout (line 553) | func setSideLayout(g *gocui.Gui) error {
function setSummaryLayout (line 578) | func setSummaryLayout(g *gocui.Gui) error {
function summaryLines (line 597) | func summaryLines(r models.ScanResult) string {
function setDetailLayout (line 665) | func setDetailLayout(g *gocui.Gui) error {
function setChangelogLayout (line 695) | func setChangelogLayout(g *gocui.Gui) error {
type dataForTmpl (line 924) | type dataForTmpl struct
function detailLines (line 944) | func detailLines() (string, error) {
constant mdTemplate (line 1049) | mdTemplate = `
FILE: util/util.go
function GenWorkers (line 17) | func GenWorkers(num int) chan<- func() {
function AppendIfMissing (line 35) | func AppendIfMissing(slice []string, s string) []string {
function URLPathJoin (line 43) | func URLPathJoin(baseURL string, paths ...string) (string, error) {
function URLPathParamJoin (line 62) | func URLPathParamJoin(baseURL string, paths []string, params map[string]...
function IP (line 81) | func IP() (ipv4Addrs []string, ipv6Addrs []string, err error) {
function PrependProxyEnv (line 113) | func PrependProxyEnv(cmd string) string {
function proxyEnv (line 121) | func proxyEnv() string {
function Truncate (line 144) | func Truncate(str string, length int) string {
function Distinct (line 155) | func Distinct(ss []string) (distincted []string) {
function Major (line 167) | func Major(version string) string {
function GetHTTPClient (line 182) | func GetHTTPClient(proxy string) (*http.Client, error) {
FILE: util/util_test.go
function TestUrlJoin (line 9) | func TestUrlJoin(t *testing.T) {
function TestPrependHTTPProxyEnv (line 81) | func TestPrependHTTPProxyEnv(t *testing.T) {
function TestTruncate (line 118) | func TestTruncate(t *testing.T) {
function Test_major (line 158) | func Test_major(t *testing.T) {
Condensed preview — 208 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,499K chars).
[
{
"path": ".dockerignore",
"chars": 55,
"preview": ".dockerignore\nDockerfile\nvendor/\n*.sqlite3*\nsetup/\nimg/"
},
{
"path": ".github/FUNDING.yml",
"chars": 65,
"preview": "# These are supported funding model platforms\n\ngithub: kotakanbe\n"
},
{
"path": ".github/ISSUE_TEMPLATE/BUG_REPORT.md",
"chars": 653,
"preview": "---\nname: Bug Report\nlabels: bug\nabout: If something isn't working as expected.\n---\n\n# What did you do? (required. The i"
},
{
"path": ".github/ISSUE_TEMPLATE/FEATURE_REQUEST.md",
"chars": 187,
"preview": "---\nname: Feature Request\nlabels: enhancement\nabout: I have a suggestion (and might want to implement myself)!\n---\n\n<!--"
},
{
"path": ".github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md",
"chars": 222,
"preview": "---\nname: Support Question\nlabels: question\nabout: If you have a question about Vuls.\n---\n\n<!--\nIf you have a trouble, f"
},
{
"path": ".github/ISSUE_TEMPLATE/VULSREPO.md",
"chars": 90,
"preview": "---\nname: Vuls Repo\nlabels: vulsrepo\nabout: If something isn't working as expected.\n---\n\n\n"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 1252,
"preview": "\nIf this Pull Request is work in progress, Add a prefix of “[WIP]” in the title.\n\n# What did you implement:\n\nPlease incl"
},
{
"path": ".github/dependabot.yml",
"chars": 2176,
"preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
},
{
"path": ".github/workflows/build.yml",
"chars": 834,
"preview": "name: Build\n\non:\n pull_request:\n\npermissions: \n contents: read \njobs:\n build:\n strategy:\n fail-fast: false\n "
},
{
"path": ".github/workflows/codeql-analysis.yml",
"chars": 2792,
"preview": "# For most projects, this workflow file will not need changing; you simply need\n# to commit it to your repository.\n#\n# Y"
},
{
"path": ".github/workflows/diet-check.yml",
"chars": 3256,
"preview": "name: Diet PR Check\non:\n pull_request:\n paths: ['go.mod', 'go.sum']\n\npermissions:\n contents: read\n\njobs:\n diet-met"
},
{
"path": ".github/workflows/docker-publish.yml",
"chars": 2540,
"preview": "name: Publish Docker image\n\non:\n push:\n branches:\n - 'master'\n tags:\n - '*'\n\npermissions:\n contents: r"
},
{
"path": ".github/workflows/golangci.yml",
"chars": 701,
"preview": "name: golangci-lint\non:\n push:\n tags:\n - v*\n branches:\n - master\n pull_request:\npermissions:\n content"
},
{
"path": ".github/workflows/goreleaser.yml",
"chars": 1486,
"preview": "name: goreleaser\n\non:\n push:\n tags:\n - '*'\npermissions:\n contents: read\n id-token: none\njobs:\n goreleaser:\n "
},
{
"path": ".github/workflows/scorecard.yml",
"chars": 3478,
"preview": "# This workflow uses actions that are not certified by GitHub. They are provided\n# by a third-party and are governed by "
},
{
"path": ".github/workflows/test.yml",
"chars": 530,
"preview": "name: Test\n\non: [pull_request]\n\npermissions:\n contents: read\njobs:\n build:\n name: Build\n runs-on: ubuntu-latest\n"
},
{
"path": ".gitignore",
"chars": 216,
"preview": ".vscode\n*.txt\n*.swp\n*.sqlite3*\n*.db\n*.toml\ntags\n.gitmodules\ncoverage.out\nissues/\nvendor/\nlog/\nresults\n!setup/docker/*\n.D"
},
{
"path": ".golangci.yml",
"chars": 1717,
"preview": "version: \"2\"\n\nlinters:\n default: none\n enable:\n - errcheck\n - govet\n - ineffassign\n - misspell\n - preal"
},
{
"path": ".goreleaser.yml",
"chars": 3470,
"preview": "version: 2\nproject_name: vuls\nrelease:\n github:\n owner: future-architect\n name: vuls\nbuilds:\n- id: vuls\n env:\n "
},
{
"path": "CHANGELOG.md",
"chars": 52120,
"preview": "# Change Log\n\n## v0.4.1 and later, see [GitHub release](https://github.com/future-architect/vuls/releases)\n\n## [v0.4.0]("
},
{
"path": "Dockerfile",
"chars": 740,
"preview": "FROM golang:alpine@sha256:d4c4845f5d60c6a974c6000ce58ae079328d03ab7f721a0734277e69905473e5 as builder\n\nRUN apk add --no-"
},
{
"path": "GNUmakefile",
"chars": 8957,
"preview": ".PHONY: \\\n\tbuild \\\n\tinstall \\\n\tall \\\n\tvendor \\\n\tlint \\\n\tvet \\\n\tfmt \\\n\tfmtcheck \\\n\tpretest \\\n\ttest \\\n\tcov \\\n\tclean\n\nSRCS "
},
{
"path": "LICENSE",
"chars": 35117,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "README.md",
"chars": 9661,
"preview": "\n# Vuls: VULnerability Scanner\n\n[](http://goo.gl/forms/xm5KFo3"
},
{
"path": "SECURITY.md",
"chars": 137,
"preview": "# Security Policy\n\n## Supported Versions\n\nOnly the latest version is supported.\n\n## Reporting a Vulnerability\n\nEmail kot"
},
{
"path": "cache/bolt.go",
"chars": 4356,
"preview": "package cache\n\nimport (\n\t\"encoding/json\"\n\t\"time\"\n\n\tbolt \"go.etcd.io/bbolt\"\n\t\"golang.org/x/xerrors\"\n\n\t\"github.com/future-"
},
{
"path": "cache/bolt_test.go",
"chars": 2687,
"preview": "package cache\n\nimport (\n\t\"os\"\n\t\"reflect\"\n\t\"testing\"\n\n\tbolt \"go.etcd.io/bbolt\"\n\n\t\"github.com/future-architect/vuls/config"
},
{
"path": "cache/db.go",
"chars": 724,
"preview": "package cache\n\nimport (\n\t\"time\"\n\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/future-architect/vuls/models\"\n)"
},
{
"path": "cmd/scanner/main.go",
"chars": 898,
"preview": "package main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"context\"\n\n\t\"github.com/future-architect/vuls/config\"\n\tcommands \"github.co"
},
{
"path": "cmd/vuls/main.go",
"chars": 1006,
"preview": "package main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"context\"\n\n\t\"github.com/future-architect/vuls/config\"\n\tcommands \"github.co"
},
{
"path": "config/awsconf.go",
"chars": 1838,
"preview": "package config\n\nimport (\n\t\"fmt\"\n\t\"slices\"\n\n\t\"github.com/aws/aws-sdk-go-v2/service/s3\"\n\t\"github.com/aws/aws-sdk-go-v2/ser"
},
{
"path": "config/azureconf.go",
"chars": 1390,
"preview": "package config\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"golang.org/x/xerrors\"\n)\n\n// AzureConf is azure config\ntype AzureConf struct {\n\t"
},
{
"path": "config/chatworkconf.go",
"chars": 671,
"preview": "package config\n\nimport (\n\t\"github.com/asaskevich/govalidator\"\n\t\"golang.org/x/xerrors\"\n)\n\n// ChatWorkConf is ChatWork con"
},
{
"path": "config/color.go",
"chars": 269,
"preview": "package config\n\nvar (\n\t// Colors has ansi color list\n\tColors = []string{\n\t\t\"\\033[32m\", // green\n\t\t\"\\033[33m\", // yellow\n"
},
{
"path": "config/config.go",
"chars": 12710,
"preview": "package config\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/asaskevich/govalidator\"\n\t\"golang.org/x/xerrors"
},
{
"path": "config/config_test.go",
"chars": 800,
"preview": "package config\n\nimport (\n\t\"testing\"\n\n\t\"github.com/future-architect/vuls/constant\"\n)\n\nfunc TestDistro_MajorVersion(t *tes"
},
{
"path": "config/config_v1.go",
"chars": 3764,
"preview": "package config\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/BurntSushi/toml\"\n\t\"golang.org/x"
},
{
"path": "config/googlechatconf.go",
"chars": 929,
"preview": "package config\n\nimport (\n\t\"github.com/asaskevich/govalidator\"\n\t\"golang.org/x/xerrors\"\n)\n\n// GoogleChatConf is GoogleChat"
},
{
"path": "config/httpconf.go",
"chars": 555,
"preview": "package config\n\nimport (\n\t\"os\"\n\n\t\"github.com/asaskevich/govalidator\"\n)\n\n// HTTPConf is HTTP config\ntype HTTPConf struct "
},
{
"path": "config/jsonloader.go",
"chars": 271,
"preview": "package config\n\nimport \"golang.org/x/xerrors\"\n\n// JSONLoader loads configuration\ntype JSONLoader struct {\n}\n\n// Load loa"
},
{
"path": "config/loader.go",
"chars": 224,
"preview": "package config\n\n// Load loads configuration\nfunc Load(path string) error {\n\tloader := TOMLLoader{}\n\treturn loader.Load(p"
},
{
"path": "config/os.go",
"chars": 21663,
"preview": "package config\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/future-architect/vuls/constant\"\n)\n\n// EOL has End-of-Li"
},
{
"path": "config/os_test.go",
"chars": 27195,
"preview": "package config\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/future-architect/vuls/constant\"\n)\n\nfunc TestEOL_IsStandardSupp"
},
{
"path": "config/portscan.go",
"chars": 6536,
"preview": "package config\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/asaskevich/govalidator\"\n\t\"golang"
},
{
"path": "config/portscan_test.go",
"chars": 1410,
"preview": "package config\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc TestPortScanConf_getScanTechniques(t *testing.T) {\n\ttests := []st"
},
{
"path": "config/saasconf.go",
"chars": 687,
"preview": "package config\n\nimport (\n\t\"github.com/asaskevich/govalidator\"\n\t\"golang.org/x/xerrors\"\n)\n\n// SaasConf is FutureVuls confi"
},
{
"path": "config/scanmode.go",
"chars": 2235,
"preview": "package config\n\nimport (\n\t\"strings\"\n\n\t\"golang.org/x/xerrors\"\n)\n\n// ScanMode has a type of scan mode. fast, fast-root, de"
},
{
"path": "config/scanmodule.go",
"chars": 2141,
"preview": "package config\n\nimport (\n\t\"strings\"\n\n\t\"golang.org/x/xerrors\"\n)\n\n// ScanModule has a type of scan module\ntype ScanModule "
},
{
"path": "config/scanmodule_test.go",
"chars": 1118,
"preview": "package config\n\nimport (\n\t\"testing\"\n)\n\nfunc TestScanModule_IsZero(t *testing.T) {\n\ttests := []struct {\n\t\tname string\n\t\t"
},
{
"path": "config/slackconf.go",
"chars": 1349,
"preview": "package config\n\nimport (\n\t\"strings\"\n\n\t\"github.com/asaskevich/govalidator\"\n\t\"golang.org/x/xerrors\"\n)\n\n// SlackConf is sla"
},
{
"path": "config/smtpconf.go",
"chars": 2180,
"preview": "package config\n\nimport (\n\t\"github.com/asaskevich/govalidator\"\n\t\"golang.org/x/xerrors\"\n)\n\n// SMTPConf is smtp config\ntype"
},
{
"path": "config/syslog/syslogconf.go",
"chars": 2561,
"preview": "//go:build !windows\n\npackage syslog\n\nimport (\n\t\"errors\"\n\t\"log/syslog\"\n\n\t\"github.com/asaskevich/govalidator\"\n\t\"golang.org"
},
{
"path": "config/syslog/syslogconf_test.go",
"chars": 1059,
"preview": "//go:build !windows\n\npackage syslog\n\nimport (\n\t\"testing\"\n)\n\nfunc TestSyslogConfValidate(t *testing.T) {\n\tvar tests = []s"
},
{
"path": "config/syslog/syslogconf_windows.go",
"chars": 240,
"preview": "//go:build windows\n\npackage syslog\n\nimport \"golang.org/x/xerrors\"\n\n// Validate validates configuration\nfunc (c *Conf) Va"
},
{
"path": "config/syslog/types.go",
"chars": 321,
"preview": "package syslog\n\n// Conf is syslog config\ntype Conf struct {\n\tProtocol string `json:\"-\"`\n\tHost string `valid:\"host\" j"
},
{
"path": "config/telegramconf.go",
"chars": 666,
"preview": "package config\n\nimport (\n\t\"github.com/asaskevich/govalidator\"\n\t\"golang.org/x/xerrors\"\n)\n\n// TelegramConf is Telegram con"
},
{
"path": "config/tomlloader.go",
"chars": 8432,
"preview": "package config\n\nimport (\n\t\"fmt\"\n\t\"maps\"\n\t\"net\"\n\t\"regexp\"\n\t\"runtime\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/BurntSushi/toml\"\n"
},
{
"path": "config/tomlloader_test.go",
"chars": 3129,
"preview": "package config\n\nimport (\n\t\"reflect\"\n\t\"slices\"\n\t\"testing\"\n)\n\nfunc TestHosts(t *testing.T) {\n\tvar tests = []struct {\n\t\tin "
},
{
"path": "config/vulnDictConf.go",
"chars": 7803,
"preview": "package config\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"time\"\n\n\t\"github.com/asaskevich/govalidator\"\n\t\"github.com/future"
},
{
"path": "config/windows.go",
"chars": 660,
"preview": "package config\n\nimport (\n\t\"golang.org/x/xerrors\"\n)\n\n// WindowsConf used for Windows Update Setting\ntype WindowsConf stru"
},
{
"path": "constant/constant.go",
"chars": 1154,
"preview": "package constant\n\n// Global constant\n// Pkg local constants should not be defined here.\n// Define them in the each packa"
},
{
"path": "contrib/Dockerfile",
"chars": 1072,
"preview": "FROM golang:alpine@sha256:d4c4845f5d60c6a974c6000ce58ae079328d03ab7f721a0734277e69905473e5 as builder\n\nRUN apk add --no-"
},
{
"path": "contrib/future-vuls/README.md",
"chars": 4886,
"preview": "# future-vuls\n\n## Main Features\n\n- `future-vuls upload` \n - upload vuls results json to future-vuls\n\n- `future-vuls dis"
},
{
"path": "contrib/future-vuls/cmd/main.go",
"chars": 5841,
"preview": "// Package main ...\npackage main\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"fmt\"\n\t\"net\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\tvulsCon"
},
{
"path": "contrib/future-vuls/pkg/config/config.go",
"chars": 688,
"preview": "// Package config ...\npackage config\n\nconst (\n\t// DiscoverTomlFileName ...\n\tDiscoverTomlFileName = \"discover_list.toml\"\n"
},
{
"path": "contrib/future-vuls/pkg/cpe/cpe.go",
"chars": 5646,
"preview": "// Package cpe ...\npackage cpe\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"maps\"\n\t\"os\"\n\t\"slices\"\n\t\"time\"\n\n\t\"github.com/BurntSushi/toml"
},
{
"path": "contrib/future-vuls/pkg/discover/discover.go",
"chars": 4177,
"preview": "// Package discover ...\npackage discover\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"runtime\"\n\t\"time\"\n\n\t\"github"
},
{
"path": "contrib/future-vuls/pkg/fvuls/fvuls.go",
"chars": 6175,
"preview": "// Package fvuls ...\npackage fvuls\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\t\"time\""
},
{
"path": "contrib/future-vuls/pkg/fvuls/model.go",
"chars": 1117,
"preview": "// Package fvuls ...\npackage fvuls\n\n// CreatePseudoServerInput ...\ntype CreatePseudoServerInput struct {\n\tServerName str"
},
{
"path": "contrib/owasp-dependency-check/parser/parser.go",
"chars": 1504,
"preview": "package parser\n\nimport (\n\t\"encoding/xml\"\n\t\"io\"\n\t\"os\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/knqyf263/go-cpe/naming\"\n\tlog \"gi"
},
{
"path": "contrib/trivy/README.md",
"chars": 675,
"preview": "# trivy-to-vuls\n\n## Main Features\n\n- convert trivy's results json to vuls's report json\n\n## Installation\n\n```\ngit clone "
},
{
"path": "contrib/trivy/cmd/main.go",
"chars": 2285,
"preview": "package main\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/future-architect/v"
},
{
"path": "contrib/trivy/parser/parser.go",
"chars": 964,
"preview": "// Package parser ...\npackage parser\n\nimport (\n\t\"encoding/json\"\n\n\tv2 \"github.com/future-architect/vuls/contrib/trivy/par"
},
{
"path": "contrib/trivy/parser/v2/parser.go",
"chars": 2148,
"preview": "package v2\n\nimport (\n\t\"encoding/json\"\n\t\"regexp\"\n\t\"time\"\n\n\t\"github.com/aquasecurity/trivy/pkg/types\"\n\t\"golang.org/x/xerro"
},
{
"path": "contrib/trivy/parser/v2/parser_test.go",
"chars": 125914,
"preview": "package v2\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/d4l3k/messagediff\"\n\t\"golang.org/x/xerrors\"\n\n\t\"github.com/future-ar"
},
{
"path": "contrib/trivy/pkg/converter.go",
"chars": 10331,
"preview": "package pkg\n\nimport (\n\t\"cmp\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\t\"time\"\n\n\ttrivydbTypes \"github.com/aquas"
},
{
"path": "contrib/trivy/pkg/converter_test.go",
"chars": 14064,
"preview": "package pkg_test\n\nimport (\n\t\"testing\"\n\n\tftypes \"github.com/aquasecurity/trivy/pkg/fanal/types\"\n\t\"github.com/future-archi"
},
{
"path": "contrib/trivy/pkg/export_test.go",
"chars": 51,
"preview": "package pkg\n\nvar GetLockfilePath = getLockfilePath\n"
},
{
"path": "cti/cti.go",
"chars": 127489,
"preview": "package cti\n\n// Technique has MITER ATT&CK Technique or CAPEC information\ntype Technique struct {\n\tName string `j"
},
{
"path": "cwe/cwe.go",
"chars": 3667,
"preview": "package cwe\n\n// CweTopTwentyfives has CWE-ID in CWE Top 25\nvar CweTopTwentyfives = map[string]map[string]string{\n\t\"2019\""
},
{
"path": "cwe/en.go",
"chars": 606842,
"preview": "package cwe\n\n// Cwe has CWE information\ntype Cwe struct {\n\tCweID string `json:\"cweID\"`\n\tName "
},
{
"path": "cwe/ja.go",
"chars": 56106,
"preview": "package cwe\n\n// CweDictJa is the Cwe dictionary\nvar CweDictJa = map[string]Cwe{\n\t\"1\": {\n\t\tCweID: \"1\",\n\t\tNa"
},
{
"path": "cwe/owasp.go",
"chars": 7363,
"preview": "package cwe\n\n// OwaspTopTens has CWE-ID in OWASP Top 10\nvar OwaspTopTens = map[string]map[string]string{\n\t\"2017\": owaspT"
},
{
"path": "cwe/sans.go",
"chars": 1719,
"preview": "package cwe\n\n// SansTopTwentyfives has CWE-ID in CWE/SANS Top 25\nvar SansTopTwentyfives = map[string]map[string]string{\n"
},
{
"path": "detector/cti.go",
"chars": 5564,
"preview": "//go:build !scanner\n\npackage detector\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/cenkalti/ba"
},
{
"path": "detector/cve_client.go",
"chars": 6589,
"preview": "//go:build !scanner\n\npackage detector\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/cenk"
},
{
"path": "detector/detector.go",
"chars": 25780,
"preview": "//go:build !scanner\n\npackage detector\n\nimport (\n\t\"cmp\"\n\t\"fmt\"\n\t\"os\"\n\t\"slices\"\n\t\"strings\"\n\t\"time\"\n\n\t\"golang.org/x/xerrors"
},
{
"path": "detector/detector_test.go",
"chars": 5449,
"preview": "//go:build !scanner\n\npackage detector\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/future-architect/vuls/cwe\"\n\t\"github."
},
{
"path": "detector/exploitdb.go",
"chars": 7130,
"preview": "//go:build !scanner\n\npackage detector\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/cenkalti/ba"
},
{
"path": "detector/exploitdb_test.go",
"chars": 3065,
"preview": "//go:build !scanner\n\npackage detector_test\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/future-architect/vuls/detector\""
},
{
"path": "detector/github.go",
"chars": 14853,
"preview": "//go:build !scanner\n\npackage detector\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"strconv\""
},
{
"path": "detector/javadb/javadb.go",
"chars": 4795,
"preview": "//go:build !scanner\n\n// Package javadb implements functions that wrap trivy-java-db module.\npackage javadb\n\nimport (\n\t\"c"
},
{
"path": "detector/kevuln.go",
"chars": 10250,
"preview": "//go:build !scanner\n\npackage detector\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/cenkalti/ba"
},
{
"path": "detector/library.go",
"chars": 10334,
"preview": "//go:build !scanner\n\npackage detector\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\t\"time"
},
{
"path": "detector/msf.go",
"chars": 6743,
"preview": "//go:build !scanner\n\npackage detector\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/cenkalti/ba"
},
{
"path": "detector/util.go",
"chars": 9169,
"preview": "//go:build !scanner\n\npackage detector\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"maps\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"slic"
},
{
"path": "detector/vuls2/db.go",
"chars": 4067,
"preview": "package vuls2\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"time\"\n\n\t\"github.com/pkg/errors\"\n\tbolt \"go.etcd.io/bbolt\"\n\t\"golang.org/x"
},
{
"path": "detector/vuls2/db_test.go",
"chars": 4517,
"preview": "package vuls2_test\n\nimport (\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"testing\"\n\t\"time\"\n\n\t\"golang.org/x/xerrors\"\n\n\t\"github.com/Maine"
},
{
"path": "detector/vuls2/export_test.go",
"chars": 165,
"preview": "package vuls2\n\nvar (\n\tShouldDownload = shouldDownload\n\n\tPreConvert = preConvert\n\tPostConvert = postConvert\n\tPruneCr"
},
{
"path": "detector/vuls2/vendor.go",
"chars": 32244,
"preview": "package vuls2\n\nimport (\n\t\"cmp\"\n\t\"fmt\"\n\t\"slices\"\n\t\"strings\"\n\n\tapk \"github.com/knqyf263/go-apk-version\"\n\tdeb \"github.com/k"
},
{
"path": "detector/vuls2/vuls2.go",
"chars": 34544,
"preview": "package vuls2\n\nimport (\n\t\"cmp\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"iter\"\n\t\"maps\"\n\t\"net/url\"\n\t\"path\"\n\t\"runtime\"\n\t\"slices\"\n\t\"strings"
},
{
"path": "detector/vuls2/vuls2_test.go",
"chars": 324055,
"preview": "package vuls2_test\n\nimport (\n\t\"cmp\"\n\t\"fmt\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\tdataTypes \"github.com/MaineK00n/vuls-data-upd"
},
{
"path": "detector/wordpress.go",
"chars": 9815,
"preview": "//go:build !scanner\n\npackage detector\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"strconv\"\n\t\"string"
},
{
"path": "detector/wordpress_test.go",
"chars": 6209,
"preview": "//go:build !scanner\n\npackage detector\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/future-architect/vuls/models"
},
{
"path": "errof/errof.go",
"chars": 724,
"preview": "package errof\n\n// ErrorCode is vuls error code\ntype ErrorCode string\n\n// Error is vuls error\ntype Error struct {\n\tCode "
},
{
"path": "go.mod",
"chars": 21444,
"preview": "module github.com/future-architect/vuls\n\ngo 1.26\n\nrequire (\n\tgithub.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.4"
},
{
"path": "go.sum",
"chars": 115733,
"preview": "cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4=\ncel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ"
},
{
"path": "gost/gost.go",
"chars": 2705,
"preview": "//go:build !scanner\n\npackage gost\n\nimport (\n\t\"errors\"\n\n\t\"golang.org/x/xerrors\"\n\n\t\"github.com/future-architect/vuls/confi"
},
{
"path": "gost/microsoft.go",
"chars": 12809,
"preview": "//go:build !scanner\n\npackage gost\n\nimport (\n\t\"cmp\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"maps\"\n\t\"net/http\"\n\t\"slices\"\n\t\"strconv\"\n\t\"st"
},
{
"path": "gost/microsoft_test.go",
"chars": 10816,
"preview": "//go:build !scanner\n\npackage gost\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/future-architect/vuls/constant\"\n\t\"github"
},
{
"path": "gost/pseudo.go",
"chars": 342,
"preview": "//go:build !scanner\n\npackage gost\n\nimport (\n\t\"github.com/future-architect/vuls/models\"\n)\n\n// Pseudo is Gost client excep"
},
{
"path": "gost/redhat.go",
"chars": 3828,
"preview": "//go:build !scanner\n\npackage gost\n\nimport (\n\t\"encoding/json\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/future-architect/vuls/m"
},
{
"path": "gost/redhat_test.go",
"chars": 605,
"preview": "//go:build !scanner\n\npackage gost\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc TestParseCwe(t *testing.T) {\n\tvar tests = []st"
},
{
"path": "gost/util.go",
"chars": 4479,
"preview": "//go:build !scanner\n\npackage gost\n\nimport (\n\t\"maps\"\n\t\"net/http\"\n\t\"slices\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/cenkalti/back"
},
{
"path": "logging/logutil.go",
"chars": 3104,
"preview": "package logging\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\n\t\"github.com/k0kubun/pp\"\n\t\"github.com/"
},
{
"path": "models/cvecontents.go",
"chars": 18681,
"preview": "package models\n\nimport (\n\t\"cmp\"\n\t\"fmt\"\n\t\"maps\"\n\t\"slices\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/future-architect/vuls/constant"
},
{
"path": "models/cvecontents_test.go",
"chars": 16076,
"preview": "package models\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/future-architect/vuls/constant\"\n)\n\nfunc TestCveContents_Exc"
},
{
"path": "models/github.go",
"chars": 3644,
"preview": "package models\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// DependencyGraphManifests has a map of DependencyGraphManifest\n// key: B"
},
{
"path": "models/library.go",
"chars": 3147,
"preview": "package models\n\nimport (\n\tftypes \"github.com/aquasecurity/trivy/pkg/fanal/types\"\n)\n\n// LibraryScanners is an array of Li"
},
{
"path": "models/library_test.go",
"chars": 1981,
"preview": "package models\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc TestLibraryScanners_Find(t *testing.T) {\n\ttype args struct {\n\t\tpa"
},
{
"path": "models/models.go",
"chars": 69,
"preview": "package models\n\n// JSONVersion is JSON Version\nconst JSONVersion = 4\n"
},
{
"path": "models/packages.go",
"chars": 12237,
"preview": "package models\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"maps\"\n\t\"regexp\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"golang.org/x/xerrors\"\n\n\t\"g"
},
{
"path": "models/packages_test.go",
"chars": 11417,
"preview": "package models\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/k0kubun/pp\"\n\n\t\"github.com/future-architect/vuls/constant\"\n)"
},
{
"path": "models/scanresults.go",
"chars": 15099,
"preview": "package models\n\nimport (\n\t\"bytes\"\n\t\"cmp\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"slices\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/future-architect/v"
},
{
"path": "models/scanresults_test.go",
"chars": 11304,
"preview": "package models\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/future-architect"
},
{
"path": "models/utils.go",
"chars": 16601,
"preview": "//go:build !scanner\n\npackage models\n\nimport (\n\t\"cmp\"\n\t\"fmt\"\n\t\"slices\"\n\t\"strings\"\n\t\"time\"\n\n\tcvedict \"github.com/vulsio/go"
},
{
"path": "models/utils_test.go",
"chars": 27123,
"preview": "//go:build !scanner\n\npackage models_test\n\nimport (\n\t\"cmp\"\n\t\"reflect\"\n\t\"slices\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/future-a"
},
{
"path": "models/vulninfos.go",
"chars": 35767,
"preview": "package models\n\nimport (\n\t\"bytes\"\n\t\"cmp\"\n\t\"fmt\"\n\t\"maps\"\n\t\"regexp\"\n\t\"slices\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/future-arch"
},
{
"path": "models/vulninfos_test.go",
"chars": 44037,
"preview": "package models\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestTitles(t *testing.T) {\n\ttype in struct {\n\t\tlang strin"
},
{
"path": "models/wordpress.go",
"chars": 1758,
"preview": "package models\n\n// WordPressPackages has Core version, plugins and themes.\ntype WordPressPackages []WpPackage\n\n// CoreVe"
},
{
"path": "reporter/azureblob.go",
"chars": 3143,
"preview": "package reporter\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/Azure/azure-sdk-for-go/sdk/storage/a"
},
{
"path": "reporter/chatwork.go",
"chars": 1849,
"preview": "package reporter\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/future-a"
},
{
"path": "reporter/email.go",
"chars": 6497,
"preview": "package reporter\n\nimport (\n\t\"crypto/tls\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/mail\"\n\t\"strings\"\n\t\"time\"\n\n\tsasl \"github.com/emersion/go-sas"
},
{
"path": "reporter/googlechat.go",
"chars": 2577,
"preview": "package reporter\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"regexp\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/future-arch"
},
{
"path": "reporter/http.go",
"chars": 1574,
"preview": "package reporter\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"io\"\n\t\"net/http\"\n\n\t\"golang.org/x/xerrors\"\n\n\t\"github.com/future-arc"
},
{
"path": "reporter/localfile.go",
"chars": 3970,
"preview": "package reporter\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/CycloneDX/cyclonedx-go\"\n\t\"golang"
},
{
"path": "reporter/s3.go",
"chars": 4726,
"preview": "package reporter\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"path\"\n\t\"slices\"\n\t\"time\"\n\n\t\"github.com"
},
{
"path": "reporter/sbom/cyclonedx.go",
"chars": 15582,
"preview": "package sbom\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"maps\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\tcdx \"github.com/CycloneDX/cyclo"
},
{
"path": "reporter/sbom/cyclonedx_test.go",
"chars": 3583,
"preview": "package sbom_test\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\tcdx \"github.com/CycloneDX/cyclonedx-go\"\n\t\"github.com/google/go-cmp/cmp\""
},
{
"path": "reporter/sbom/purl.go",
"chars": 5056,
"preview": "package sbom\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\tftypes \"github.com/aquasecurity/trivy/pkg/fanal/types\"\n\t\"github.com/package-u"
},
{
"path": "reporter/sbom/purl_test.go",
"chars": 1666,
"preview": "package sbom\n\nimport (\n\t\"testing\"\n\n\t\"github.com/package-url/packageurl-go\"\n)\n\nfunc TestParsePkgName(t *testing.T) {\n\ttyp"
},
{
"path": "reporter/sbom/spdx.go",
"chars": 18483,
"preview": "package sbom\n\nimport (\n\t\"cmp\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"math/rand/v2\"\n\t\"slices\"\n\t\"time\"\n\n\t\"github.com/google/uuid\"\n\t\"git"
},
{
"path": "reporter/sbom/spdx_test.go",
"chars": 4473,
"preview": "package sbom_test\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/google/go-cmp/cmp\"\n\t\"github.com/google/go-cmp/cmp/cmpopts\"\n"
},
{
"path": "reporter/slack.go",
"chars": 9732,
"preview": "package reporter\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"slices\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/cenkalti/backoff\"\n\t\"github"
},
{
"path": "reporter/slack_test.go",
"chars": 386,
"preview": "package reporter\n\nimport \"testing\"\n\nfunc TestGetNotifyUsers(t *testing.T) {\n\tvar tests = []struct {\n\t\tin []string\n"
},
{
"path": "reporter/stdout.go",
"chars": 1206,
"preview": "package reporter\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/future-architect/vuls/models\"\n\t\"golang.org/x/xerrors\"\n)\n\n// StdoutWriter"
},
{
"path": "reporter/syslog.go",
"chars": 3550,
"preview": "//go:build !windows\n\npackage reporter\n\nimport (\n\t\"fmt\"\n\t\"log/syslog\"\n\t\"strings\"\n\n\t\"golang.org/x/xerrors\"\n\n\tsyslogConf \"g"
},
{
"path": "reporter/syslog_test.go",
"chars": 3963,
"preview": "//go:build !windows\n\npackage reporter\n\nimport (\n\t\"slices\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/future-architect/vuls/models\""
},
{
"path": "reporter/telegram.go",
"chars": 2444,
"preview": "package reporter\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/future-arc"
},
{
"path": "reporter/util.go",
"chars": 24280,
"preview": "package reporter\n\nimport (\n\t\"bytes\"\n\t\"cmp\"\n\t\"encoding/csv\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"maps\"\n\t\"os\"\n\t\"path/f"
},
{
"path": "reporter/util_test.go",
"chars": 15141,
"preview": "package reporter\n\nimport (\n\t\"os\"\n\t\"reflect\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/future-architect/vuls/models\"\n\t\"github.com/"
},
{
"path": "reporter/writer.go",
"chars": 482,
"preview": "package reporter\n\nimport (\n\t\"bytes\"\n\t\"compress/gzip\"\n\n\t\"github.com/future-architect/vuls/models\"\n)\n\n// ResultWriter Inte"
},
{
"path": "saas/saas.go",
"chars": 4167,
"preview": "package saas\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\t\"path\"\n\t\"strings\"\n\t\"time\"\n\n\t"
},
{
"path": "saas/uuid.go",
"chars": 5709,
"preview": "package saas\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"os\"\n\t\"reflect\"\n\t\"strings\"\n\n\t\"github.com/BurntSushi/toml\"\n\t\"github.com/future-ar"
},
{
"path": "saas/uuid_test.go",
"chars": 9690,
"preview": "package saas\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\tc \"github.com/future-architect/vuls/config\"\n\t\"github.com/future-architect"
},
{
"path": "scanner/alma.go",
"chars": 2511,
"preview": "package scanner\n\nimport (\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/future-architect/vuls/logging\"\n\t\"githu"
},
{
"path": "scanner/alpine.go",
"chars": 8819,
"preview": "package scanner\n\nimport (\n\t\"bufio\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/future-"
},
{
"path": "scanner/alpine_test.go",
"chars": 9347,
"preview": "package scanner\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/future-architec"
},
{
"path": "scanner/amazon.go",
"chars": 2689,
"preview": "package scanner\n\nimport (\n\t\"strings\"\n\t\"time\"\n\n\t\"golang.org/x/xerrors\"\n\n\t\"github.com/future-architect/vuls/config\"\n\t\"gith"
},
{
"path": "scanner/base.go",
"chars": 43017,
"preview": "package scanner\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t"
},
{
"path": "scanner/base_test.go",
"chars": 20933,
"preview": "package scanner\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t_ \"github.com/aquasecurity/trivy/pkg/fanal/analyzer/language/dotnet/de"
},
{
"path": "scanner/centos.go",
"chars": 2476,
"preview": "package scanner\n\nimport (\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/future-architect/vuls/logging\"\n\t\"githu"
},
{
"path": "scanner/debian.go",
"chars": 38003,
"preview": "package scanner\n\nimport (\n\t\"bufio\"\n\t\"crypto/rand\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\t\""
},
{
"path": "scanner/debian_test.go",
"chars": 35108,
"preview": "package scanner\n\nimport (\n\t\"cmp\"\n\t\"os\"\n\t\"reflect\"\n\t\"slices\"\n\t\"testing\"\n\n\tgocmp \"github.com/google/go-cmp/cmp\"\n\tgocmpopts"
},
{
"path": "scanner/executil.go",
"chars": 9386,
"preview": "package scanner\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"hash/fnv\"\n\t\"io\"\n\tex \"os/exec\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"slices\"\n\t\"string"
},
{
"path": "scanner/executil_test.go",
"chars": 5720,
"preview": "package scanner\n\nimport (\n\t\"testing\"\n\n\t\"github.com/future-architect/vuls/config\"\n)\n\nfunc TestDecorateCmd(t *testing.T) {"
},
{
"path": "scanner/fedora.go",
"chars": 2397,
"preview": "package scanner\n\nimport (\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/future-architect/vuls/logging\"\n\t\"githu"
},
{
"path": "scanner/freebsd.go",
"chars": 8654,
"preview": "package scanner\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"maps\"\n\t\"strings\"\n\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/fu"
},
{
"path": "scanner/freebsd_test.go",
"chars": 7298,
"preview": "package scanner\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/future-architec"
},
{
"path": "scanner/library.go",
"chars": 1226,
"preview": "package scanner\n\nimport (\n\tftypes \"github.com/aquasecurity/trivy/pkg/fanal/types\"\n\t\"github.com/aquasecurity/trivy/pkg/pu"
},
{
"path": "scanner/library_test.go",
"chars": 2299,
"preview": "package scanner\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\tftypes \"github.com/aquasecurity/trivy/pkg/fanal/types\"\n\t\"github.com/fu"
},
{
"path": "scanner/macos.go",
"chars": 6817,
"preview": "package scanner\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"golang.org/x/xerrors\"\n\n\t\"github.com/future-arch"
},
{
"path": "scanner/macos_test.go",
"chars": 5040,
"preview": "package scanner\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/future-architect/vuls/constant\"\n\t\"github.com/future-archit"
},
{
"path": "scanner/oracle.go",
"chars": 2276,
"preview": "package scanner\n\nimport (\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/future-architect/vuls/logging\"\n\t\"githu"
},
{
"path": "scanner/pseudo.go",
"chars": 3731,
"preview": "package scanner\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"golang.org/x/xerrors\"\n\n\t\"github.com/fut"
},
{
"path": "scanner/redhatbase.go",
"chars": 35276,
"preview": "package scanner\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/future-architect/vuls/config\"\n\t\""
},
{
"path": "scanner/redhatbase_test.go",
"chars": 30048,
"preview": "package scanner\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/future-architec"
},
{
"path": "scanner/rhel.go",
"chars": 2449,
"preview": "package scanner\n\nimport (\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/future-architect/vuls/logging\"\n\t\"githu"
},
{
"path": "scanner/rocky.go",
"chars": 2530,
"preview": "package scanner\n\nimport (\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/future-architect/vuls/logging\"\n\t\"githu"
},
{
"path": "scanner/scanner.go",
"chars": 30260,
"preview": "package scanner\n\nimport (\n\t\"fmt\"\n\t\"maps\"\n\t\"math/rand\"\n\t\"net/http\"\n\t\"os\"\n\tex \"os/exec\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"slic"
},
{
"path": "scanner/scanner_test.go",
"chars": 17139,
"preview": "package scanner\n\nimport (\n\t\"net/http\"\n\t\"os\"\n\t\"reflect\"\n\t\"slices\"\n\t\"testing\"\n\n\t\"github.com/future-architect/vuls/models\"\n"
},
{
"path": "scanner/suse.go",
"chars": 10332,
"preview": "package scanner\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/"
},
{
"path": "scanner/suse_test.go",
"chars": 5280,
"preview": "package scanner\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/k0kubun/pp\"\n\n\t\"github.com/future-architect/vuls/config\"\n\t\""
},
{
"path": "scanner/trivy/jar/jar.go",
"chars": 2544,
"preview": "package jar\n\nimport (\n\t\"context\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"golang.org/x/xerrors\"\n\n\t\"github.com/aquas"
},
{
"path": "scanner/trivy/jar/parse.go",
"chars": 11249,
"preview": "package jar\n\nimport (\n\t\"archive/zip\"\n\t\"bufio\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"github"
},
{
"path": "scanner/unknownDistro.go",
"chars": 577,
"preview": "package scanner\n\nimport \"github.com/future-architect/vuls/models\"\n\n// inherit OsTypeInterface\ntype unknown struct {\n\tbas"
},
{
"path": "scanner/utils/filepath/unix/unix.go",
"chars": 8454,
"preview": "package unix\n\nimport (\n\t\"strings\"\n)\n\n// https://cs.opensource.google/go/go/+/refs/tags/go1.24.3:src/internal/filepathlit"
},
{
"path": "scanner/utils/filepath/windows/windows.go",
"chars": 13896,
"preview": "package windows\n\nimport (\n\t\"slices\"\n\t\"strings\"\n)\n\n// https://cs.opensource.google/go/go/+/refs/tags/go1.24.3:src/interna"
},
{
"path": "scanner/utils.go",
"chars": 6257,
"preview": "package scanner\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"golang.org/x/xerrors\"\n\n\t\"github"
},
{
"path": "scanner/utils_test.go",
"chars": 3901,
"preview": "package scanner\n\nimport (\n\t\"testing\"\n\n\t\"github.com/future-architect/vuls/constant\"\n\t\"github.com/future-architect/vuls/mo"
},
{
"path": "scanner/windows.go",
"chars": 186627,
"preview": "package scanner\n\nimport (\n\t\"bufio\"\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"io\"\n\t\"maps\"\n\t\"net\"\n\t\"os\"\n\t\"regexp\"\n\t\"slices\"\n\t"
},
{
"path": "scanner/windows_test.go",
"chars": 35384,
"preview": "package scanner\n\nimport (\n\t\"reflect\"\n\t\"slices\"\n\t\"testing\"\n\n\t\"github.com/future-architect/vuls/config\"\n\t\"github.com/futur"
},
{
"path": "server/server.go",
"chars": 5627,
"preview": "//go:build !scanner\n\npackage server\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"mime\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"gith"
},
{
"path": "setup/docker/README.md",
"chars": 162,
"preview": "\n\nSee Vulsdoc \n- [Install with Docker](https://vuls.io/docs/en/install-with-docker.html) \n- [Scan using Docker](https:"
},
{
"path": "subcmds/configtest.go",
"chars": 3430,
"preview": "package subcmds\n\nimport (\n\t\"context\"\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/google/subcommands\"\n"
},
{
"path": "subcmds/discover.go",
"chars": 8834,
"preview": "package subcmds\n\nimport (\n\t\"context\"\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\t\"strings\"\n\t\"text/template\"\n\n\t\"github.com/google/su"
},
{
"path": "subcmds/history.go",
"chars": 1747,
"preview": "package subcmds\n\nimport (\n\t\"context\"\n\t\"flag\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/future-arch"
},
{
"path": "subcmds/report.go",
"chars": 12652,
"preview": "//go:build !scanner && !windows\n\npackage subcmds\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"flag\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github"
},
{
"path": "subcmds/report_windows.go",
"chars": 12199,
"preview": "//go:build !scanner && windows\n\npackage subcmds\n\nimport (\n\t\"context\"\n\t\"flag\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/aquase"
},
{
"path": "subcmds/saas.go",
"chars": 3984,
"preview": "package subcmds\n\nimport (\n\t\"context\"\n\t\"flag\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"time\"\n\n\t\"github.com/future-architect/vuls/config\"\n"
}
]
// ... and 8 more files (download for full content)
About this extraction
This page contains the full source code of the future-architect/vuls GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 208 files (2.9 MB), approximately 770.5k tokens, and a symbol index with 1641 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.