Conversation
This change introduces a new triage page to visualize and compare CVE conversion data across different stages and environments. - Added `gcp/website/triage_handlers.py` to handle triage requests and proxy GCS file access. - Registered the new blueprint in `gcp/website/main.py`. - Created the frontend template `gcp/website/frontend3/src/templates/triage.html` with a 3-column layout. - Implemented frontend logic in `gcp/website/frontend3/src/triage.js` to fetch and display JSON data from GCS or the API. - Added styles in `gcp/website/frontend3/src/triage.scss`. - Updated Webpack configuration to include the new triage entry point. - Verified with unit tests and frontend screenshots. Co-authored-by: jess-lowe <86962800+jess-lowe@users.noreply.github.com>
This change introduces a new triage page to visualize and compare CVE conversion data across different stages and environments. - Added `gcp/website/triage_handlers.py` to handle triage requests and proxy GCS file access. - Registered the new blueprint in `gcp/website/main.py`. - Created the frontend template `gcp/website/frontend3/src/templates/triage.html` with a 3-column layout. - Implemented frontend logic in `gcp/website/frontend3/src/triage.js` to fetch and display JSON data from GCS or the API. - Added styles in `gcp/website/frontend3/src/triage.scss`. - Updated Webpack configuration to include the new triage entry point. - Verified with unit tests and frontend screenshots. Co-authored-by: jess-lowe <86962800+jess-lowe@users.noreply.github.com>
This change introduces a new triage page to visualize and compare CVE conversion data across different stages and environments. - Added `gcp/website/triage_handlers.py` to handle triage requests and proxy GCS file access. - Registered the new blueprint in `gcp/website/main.py`. - Created the frontend template `gcp/website/frontend3/src/templates/triage.html` with a 3-column layout. - Implemented frontend logic in `gcp/website/frontend3/src/triage.js` to fetch and display JSON data from GCS or the API. - Added styles in `gcp/website/frontend3/src/triage.scss`. - Updated Webpack configuration to include the new triage entry point. - Verified with unit tests and frontend screenshots. Co-authored-by: jess-lowe <86962800+jess-lowe@users.noreply.github.com>
This change introduces a new triage page to visualize and compare CVE conversion data across different stages and environments. - Added `gcp/website/triage_handlers.py` to handle triage requests and proxy GCS file access. - Registered the new blueprint in `gcp/website/main.py`. - Created the frontend template `gcp/website/frontend3/src/templates/triage.html` with a 3-column layout. - Implemented frontend logic in `gcp/website/frontend3/src/triage.js` to fetch and display JSON data from GCS or the API. - Added styles in `gcp/website/frontend3/src/triage.scss`. - Updated Webpack configuration to include the new triage entry point. - Verified with unit tests and frontend screenshots. Co-authored-by: jess-lowe <86962800+jess-lowe@users.noreply.github.com>
…44985313989 feat: Add CVE conversion triage page
…44985313989 fix: improve patching issues with triage tool
| try: | ||
| response = requests.get(url, timeout=10) | ||
| response.raise_for_status() | ||
| return response.text, 200, {'Content-Type': 'application/json'} |
Check warning
Code scanning / CodeQL
Reflected server-side cross-site scripting Medium
There was a problem hiding this comment.
For running locally, the output is handled as JSON and escaped in the frontend.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new CVE conversion triager tool, which is a great addition for comparing different CVE record versions. The implementation includes a new frontend page with its corresponding JavaScript and SCSS, and a backend proxy handler in Python. The overall structure is well-thought-out. I've included several suggestions to enhance code quality, maintainability, and adherence to best practices in both the frontend and backend code.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
| url = None | ||
| if source == 'cve': | ||
| # Construct GitHub raw URL for CVE data | ||
| match = re.match(_CVE_ID_REGEX, vuln_id) |
There was a problem hiding this comment.
I see match groups below this, but the regex doesn't have capture groups?
| return div.innerHTML; | ||
| } | ||
|
|
||
| function syntaxHighlight(json) { |
There was a problem hiding this comment.
Probably should credit this codepen: https://codepen.io/absolutedevelopment/pen/EpwVzN
| }, | ||
| }; | ||
|
|
||
| function escapeHtml(text) { |
| try: | ||
| response = requests.get(url, timeout=10) | ||
| response.raise_for_status() | ||
| return response.text, 200, {'Content-Type': 'application/json'} |
There was a problem hiding this comment.
For running locally, the output is handled as JSON and escaped in the frontend.
Quite often do we need to compare multiple records of one CVE record to triage conversion issues, so this tool will allow us to compare three versions at a time.

You can select from the following record locations:
It currently exists at /triage, and utilises a proxy mechanism to load the records, but not as a path (as to prevent accessing unrelated parts of the bucket)
In the future could add a tool for an LLM to help triage what the actual problem is, but that's for another day