dependency-track icon indicating copy to clipboard operation
dependency-track copied to clipboard

Added projectAccessTeams to log statements.

Open ElenaStroebele opened this issue 2 weeks ago • 4 comments

Description

Added the projectAccessTeams to the logging statements if projects are created/updated etc. in ProjectResource.java via MDC.

Addressed Issue

Addressed issue #5616.

Additional Details

Used ChatGPT and Copilot to understand existing codebase and suggest changes.

Checklist

  • [x] I have read and understand the contributing guidelines
  • [ ] This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • [ ] This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • [ ] This PR introduces changes to the database model, and I have added corresponding update logic
  • [ ] This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

ElenaStroebele avatar Dec 09 '25 13:12 ElenaStroebele

:white_check_mark: Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
:white_check_mark: Open Source Security 0 0 0 0 0 issues

:computer: Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

owasp-dt-bot avatar Dec 09 '25 13:12 owasp-dt-bot

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +0.02% (target: -1.00%) :white_check_mark: 100.00% (target: 70.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (163efd400f5a539c31e4e7376187414396ec544d) 24092 19492 80.91%
Head commit (59928747a9193a33147d4b3ecf97170eaec896cc) 24112 (+20) 19512 (+20) 80.92% (+0.02%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#5617) 25 25 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

codacy-production[bot] avatar Dec 09 '25 14:12 codacy-production[bot]

@nscuro Please consider this PR in release 4.13.7 .

ElenaStroebele avatar Dec 10 '25 15:12 ElenaStroebele

@ElenaStroebele What is the underlying requirement for this? I am a bit confused as to what this is supposed to achieve.

nscuro avatar Dec 11 '25 17:12 nscuro

@ElenaStroebele What is the underlying requirement for this? I am a bit confused as to what this is supposed to achieve.

@nscuro This was a workaround for the following issue: #1409 in the /frontend repository which lead to projects missing an assigned team due to a bug in the code of the create-modal. Since I found the solution to the problem, this fix here is no longer a priority, though I think it would add some information for the future, to be able to identify problems with the assigned teams easier and faster. Let me know what you think! If this is not a beneficial feature to DT at all, I will close this issue.

ElenaStroebele avatar Dec 16 '25 10:12 ElenaStroebele

Then I'd prefer to close this. There could be similar situations for other fields and we can't add log fields for all of them. If there is a need for more visibility then we'll need to think about a more thorough audit logging solution, but that should be generally applicable and not on a field-by-field basis.

nscuro avatar Dec 16 '25 11:12 nscuro