Skip to content

Include hermes-agent in NVD queries and export keywords to environment#226

Merged
davida-ps merged 2 commits intomainfrom
codex/investigate-workflow-advisory-generation-issue
May 7, 2026
Merged

Include hermes-agent in NVD queries and export keywords to environment#226
davida-ps merged 2 commits intomainfrom
codex/investigate-workflow-advisory-generation-issue

Conversation

@davida-ps
Copy link
Copy Markdown
Collaborator

@davida-ps davida-ps commented May 5, 2026

User description

Motivation

  • Extend NVD polling and heuristics to detect the hermes-agent project alongside existing targets and make the plain keyword list available for PR bodies and workflow summaries.

Description

  • Added KEYWORDS export in the poll workflow by writing KEYWORDS=$KEYWORDS_PATTERN to the GITHUB_ENV so downstream steps can access the plain keywords.
  • Added hermes-agent to the NVD query specs in nvd_query_specs() and to the keyword pattern returned by nvd_keyword_pattern() in scripts/feed-utils.sh.
  • Updated nvd_github_ref_pattern() to include github.com/nousresearch/hermes-agent so GitHub reference matching detects that repository.
  • Extended the JSON/JQ detection logic in the workflow to recognize github.com/nousresearch/hermes-agent and the token hermes-agent in the inferred targets checks (changes appear in both detection blocks).

Testing

  • No automated tests were added or executed as part of this change.

Codex Task


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Enable the poll workflow and feed-utils helper functions to treat hermes-agent like other monitored projects so NVD detection, inferred targets, and keyword specs include the new repo, keywords, and CPE references. Export nvd_summary_keywords into GITHUB_ENV so downstream PR body and workflow summary steps can reuse the concise keyword list.

TopicDetails
Keyword Export Export nvd_summary_keywords into GITHUB_ENV so downstream steps can reuse the concise keyword list for PR bodies and workflow summaries.
Modified files (1)
  • .github/workflows/poll-nvd-cves.yml
Latest Contributors(2)
UserCommitDate
David.a@prompt.securityfix(workflow): export ...May 07, 2026
david.a@prompt.securityfix(workflow): expand ...May 05, 2026
NVD Targeting Expand detection flows to include hermes-agent keywords, GitHub ref, and CPE patterns so the poll workflow and feed-utils inferred-target logic normalize the new repo alongside other monitored projects.
Modified files (2)
  • .github/workflows/poll-nvd-cves.yml
  • scripts/feed-utils.sh
Latest Contributors(2)
UserCommitDate
David.a@prompt.securityfix(workflow): export ...May 07, 2026
david.a@prompt.securityfix(workflow): expand ...May 05, 2026
This pull request is reviewed by Baz. Review like a pro on (Baz).

Comment thread .github/workflows/poll-nvd-cves.yml Outdated
Comment on lines +220 to +222
# Export plain keywords for later PR body + workflow summary steps
KEYWORDS="$KEYWORDS_PATTERN"
echo "KEYWORDS=$KEYWORDS" >> "$GITHUB_ENV"
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.

KEYWORDS is rendered directly into the step-summary markdown table as-is (| Keywords | $KEYWORDS |), so the | alternation breaks the table; should we export a plain-text value for display or rename to KEYWORDS_PATTERN and transform before rendering?

Finding type: Logical Bugs | Severity: 🟢 Low


Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents:

Before applying, verify this suggestion against the current code. In
`.github/workflows/poll-nvd-cves.yml` around lines 220-222 inside the `Merge and filter
CVEs` step, `KEYWORDS` is set to `KEYWORDS_PATTERN` (a regex alternation) and then later
interpolated into a markdown table where `|` is treated as a column separator, producing
a malformed summary. Refactor so the env used for human-facing output contains a
markdown-safe plain-text representation (e.g., a joined keyword list with `|`
escaped/removed), while keeping the regex value for jq filtering as-is. Concretely,
rename the current env export to something like `KEYWORDS_PATTERN` (or keep it internal)
and introduce/export a separate `KEYWORDS_DISPLAY` (plain keywords) for the summary
rendering.

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.

Commit 00d2a0e addressed this comment by exporting a new KEYWORDS value derived from nvd_summary_keywords (a plain-text list) while keeping the regex pattern only for filtering, so the workflow summary now renders markdown-safe keywords instead of the alternation string that broke the table.

@davida-ps davida-ps merged commit dfe6245 into main May 7, 2026
14 checks passed
@davida-ps davida-ps deleted the codex/investigate-workflow-advisory-generation-issue branch May 7, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant