NASA-AMMOS / NASA-AMMOS/DCS

CodeQL: Add toString to Status so that its data can be logged

Open
#49 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

crit-3 security
Dominant language
Java
Stars
5
Forks
5
Avg merge
6h 43m
Merged PRs (30d)
5

Description

From CodeQL scan, Low level issue:

Default toString(): Status inherits toString() from Object, and so is not suitable for printing.
CodeQL:java/call-to-object-tostring external_CodeQL:java/call-to-object-tostring

Located in:
kmc-crypto-service/src/main/java/gov/nasa/jpl/ammos/kmc/crypto/model/EncryptServiceResponse.java

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in kmc-crypto-service/src/main/java/gov/nasa/jpl/ammos/kmc/crypto/model/EncryptServiceResponse.java and trace its Status type and current logging use. Add a suitable toString implementation for Status, then rerun the relevant CodeQL scan to confirm the java/call-to-object-tostring finding is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.