Skip to content

Backtick in values prevents YAML parsing #18

Description

@cengiz-io

Whenever there's a backtick in notes, Python yaml loader can't parse the fields.

  File "/home/cengiz/canonical/xxxxxxxx/venv/lib/python3.12/site-packages/yaml/scanner.py", line 258, in fetch_more_tokens
    raise ScannerError("while scanning for the next token", None,
yaml.scanner.ScannerError: while scanning for the next token
found character '`' that cannot start any token
  in "/tmp/linux-cve-analysis/vulns/CVE-2023-52467.yml", line 6, column 8

Here's the example:

reachability: Local                                                              
memory_corruption: False                                                         
bug_class: Null pointer-deref                                                    
impact: Kernel Panic                                                             
privileges_required: Low                                                         
notes: `kasprintf()` in `of_syscon_register()` returns a pointer to dynamically allocated memory which can be NULL.
author: Microsoft   

I think we shall start using multi-line blocks for the notes field.

privileges_required: Low                                                         
notes: |
  `kasprintf()` in `of_syscon_register()` returns a pointer 
  to dynamically allocated memory which can be NULL.
author: Microsoft

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions