The following command:
yarn audit --json | grep '"type":"auditAdvisory"' | jq -r '{(.data.advisory.module_name):.data.advisory.patched_versions}' | jq -s add
Will filter and convert the output of yarn audit
into an index of overrides to avoid vulnerabilities. It will produce output like this: