Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions src/views/portfolio/projects/FindingAudit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,62 @@
trim
/>
</b-form-group>
<b-form-group
v-if="owaspVector"
id="fieldset-owasp-vector"
label="OWASP RR Vector"
label-for="input-owasp-vector"
>
<b-form-input
id="input-owasp-vector"
:value="owaspVector"
class="form-control disabled"
readonly
trim
/>
</b-form-group>
<b-form-group
v-if="owaspScore"
id="fieldset-owasp-score"
label="OWASP RR Score"
label-for="input-owasp-score"
>
<b-form-input
id="input-owasp-score"
:value="owaspScore"
class="form-control disabled"
readonly
trim
/>
</b-form-group>
Comment on lines +129 to +142
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v-if="owaspScore" will hide the score when it is 0/0.0, even though that may be a valid OWASP RR score. Consider checking for null/undefined instead (e.g., owaspScore !== null && owaspScore !== undefined) so a zero score still renders.

Copilot uses AI. Check for mistakes.
<b-form-group
v-if="owaspSeverity"
id="fieldset-owasp-severity"
label="OWASP RR Severity"
label-for="input-owasp-severity"
>
<b-form-input
id="input-owasp-severity"
:value="owaspSeverity"
class="form-control disabled"
readonly
trim
/>
</b-form-group>
<b-form-group
v-if="analysisSource"
id="fieldset-analysis-source"
label="Analysis Source"
label-for="input-analysis-source"
>
Comment on lines +115 to +162
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new OWASP/analysis labels are hard-coded strings, while nearby fields use i18n via this.$t(...) (e.g., CVSS labels). This prevents localization and will be flagged by vue-i18n-extract. Please add i18n message keys for these labels and use :label="$t('...')" (or this.$t) consistently.

Copilot uses AI. Check for mistakes.
<b-form-input
id="input-analysis-source"
:value="analysisSource"
class="form-control disabled"
readonly
trim
/>
</b-form-group>
</b-col>
<b-col sm="6">
<b-form-group
Expand Down Expand Up @@ -351,6 +407,10 @@ export default {
analysisJustification: null,
analysisResponse: null,
analysisDetails: null,
owaspVector: null,
owaspScore: null,
owaspSeverity: null,
analysisSource: null,
};
},
watch: {
Expand Down Expand Up @@ -433,6 +493,18 @@ export default {
} else {
this.isSuppressed = false;
}
if (Object.prototype.hasOwnProperty.call(analysis, 'owaspVector')) {
this.owaspVector = analysis.owaspVector;
}
if (Object.prototype.hasOwnProperty.call(analysis, 'owaspScore')) {
this.owaspScore = analysis.owaspScore;
}
if (Object.prototype.hasOwnProperty.call(analysis, 'owaspSeverity')) {
this.owaspSeverity = analysis.owaspSeverity;
}
if (Object.prototype.hasOwnProperty.call(analysis, 'source')) {
this.analysisSource = analysis.source;
}
Comment on lines +496 to +507
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updateAnalysisData() sets the new OWASP/source fields only when the property exists, but never clears them when the backend omits the field. This can leave stale values visible after subsequent updates/refreshes where those properties are not present. Recommend explicitly resetting owaspVector/owaspScore/owaspSeverity/analysisSource to null when the property is missing (or initialize them all to null at the start of the method).

Copilot uses AI. Check for mistakes.
},
makeAnalysis: function () {
this.callRestEndpoint(
Expand Down
Loading