Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
secdb
secdb
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • alpine
    • infra
  • docker
  • secdbsecdb
  • Issues
  • #2

Closed
Open
Opened Jan 05, 2021 by Teppei Fukuda@knqyf263
  • Report abuse
  • New issue
Report abuse New issue

Empty values also should be an array as usual

Hi all, thank you for providing security advisories.

I found some cases where an empty value has a different type than usual. For example,

$ wget https://secdb.alpinelinux.org/v3.3/community.json
$ jq . community.json
{
  "archs": [
    "x86_64",
    "x86",
    "armhf"
  ],
  "packages": {},
  "urlprefix": "http://dl-cdn.alpinelinux.org/alpine",
  "distroversion": "v3.3",
  "apkurl": "{{urlprefix}}/{{distroversion}}/{{reponame}}/{{arch}}/{{pkg.name}}-{{pkg.ver}}.apk",
  "reponame": "community"
}

As shown above, "packages" is an object, even though it is usually an array. It causes an unmarshal error in Go.

json: cannot unmarshal object into Go value of type []alpine.packages

The same issue exists in pkg as well.

   {
      "pkg": {
        "name": "heimdal",
        "secfixes": {
          "7.1.0-r1": [
            "CVE-2017-11103"
          ],
          "7.1.0-r2": [
            "CVE-2017-17439"
          ],
          "7.4.0-r0": {}
        }
      }
    },

It is possible to fix it?

Edited Jan 05, 2021 by Teppei Fukuda
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: alpine/infra/docker/secdb#2