Skip to content

Incorrect type hint in get_cwes() #17

@Samk1710

Description

@Samk1710

def get_cwes(self, summary: str) -> List[CWEList]:

The function returns cwe.string values, which are plain strings, so the effective return type is List[str].

    def get_cwes(self, summary: str) -> List[CWEList]:
        result = self.run_agent(f"**Vulnerability Description:**\n{summary}")
        return [cwe.string for cwe in result.output.cwes]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions