Skip to content

Use kernelkit/goyang instead of patched builtin#1541

Merged
troglobit merged 2 commits into
mainfrom
web-vendoring
Jun 18, 2026
Merged

Use kernelkit/goyang instead of patched builtin#1541
troglobit merged 2 commits into
mainfrom
web-vendoring

Conversation

@troglobit

@troglobit troglobit commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Description

Refactor, or cleanup, of one of the new webui's dependencies. This drops the locally patched "fork" of goyang with the same open pattern used by KernelKit for other deps.

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

The three YANG 1.1 fixes lived as a frozen, one-shot copy of goyang
v1.6.3 under internal/goyang (via a local `replace`) — invisible to
dependency/CVE tracking and impossible to update.  Move them to the
maintained kernelkit/goyang fork (v1.6.3-kkit branch) and depend on it
through go.mod, pinned by commit hash; drop the in-tree copy.  getopt
falls out of the dependency set since it was only used by goyang's CLI,
not pkg/yang.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>

This comment was marked as resolved.

@troglobit troglobit changed the title WIP: Use kernelkit/goyang instead of patched builtin Use kernelkit/goyang instead of patched builtin Jun 18, 2026
@troglobit troglobit requested a review from mattiaswal June 18, 2026 05:32
Comment thread .github/workflows/govulncheck.yml Outdated
} | tee -a "$GITHUB_STEP_SUMMARY"

# Gate only on vulnerabilities our code actually calls in a
# dependency. Called stdlib vulns are fixed by bumping the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this handle indirect usage as well? If we use a function that uses something bad?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is a bit vague, govulncheck actually reaches any vulnerable symbol in the call graph. I've updated the comment.

Add govulncheck CI and Dependabot for the two Go modules, src/webui
and src/netbrowse, so vendored dependencies don't quietly accumulate
CVEs between manual updates.

The workflow reports every finding in the run summary but only fails
on vulnerabilities our code actually calls in a dependency.  Called
stdlib vulnerabilities are surfaced too, but they're fixed by bumping
the Buildroot host Go rather than a module's go.mod, so they don't
gate the build.

Dependabot ignores openconfig/goyang: it's pinned to our kernelkit
fork via a replace directive and stepped by hand.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit troglobit force-pushed the web-vendoring branch 2 times, most recently from 84f83ec to a365238 Compare June 18, 2026 08:43
@troglobit troglobit requested a review from mattiaswal June 18, 2026 08:43
@troglobit troglobit merged commit 25ff6f5 into main Jun 18, 2026
10 checks passed
@troglobit troglobit deleted the web-vendoring branch June 18, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants