Skip to content

Conversation

Copy link

Copilot AI commented Nov 18, 2025

Eliminated technical debt across the repository: removed broken/incomplete code, fixed security vulnerability, and cleaned up orphaned configuration.

Removed Dead Code

  • Python: Empty test file, unused point.py example
  • Rust: Broken server.rs (missing tcp module dependency)
  • COBOL: Demo CUSTPROC.cbl file
  • Terraform: Empty iac.tf file
  • Scripts: Two unused utility scripts (find_json_string.py, report_bofa_emu_versions.py)
  • Docs: Three stub files with no meaningful content
  • Assets: Unreferenced 84KB cloud_infra.png

Security Fix

Fixed SQL injection in python/sql.py - replaced string concatenation with parameterized queries:

# Before
query = "SELECT * FROM users WHERE username = '" + username + "'"
cursor.execute(query)

# After  
query = "SELECT * FROM users WHERE username = %s"
cursor.execute(query, (username,))

Cleanup

  • Removed unused imports from DotnetApp/Program.cs
  • Deleted language instructions for removed Rust/C code
  • Updated README references to existing files
  • Removed 5 empty directories

Impact: -540 LOC, -84KB assets, 1 critical security fix

Original prompt

Clean up this repo for me

Custom agent used: Janitor
Perform janitorial tasks on any codebase including cleanup, simplification, and tech debt remediation.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: mpchenette <98562887+mpchenette@users.noreply.github.com>

def add_user(username, password):
conn = mysql.connector.connect
conn = mysql.connector.connect(user='root', password='password', host='localhost', database='users')

Check failure

Code scanning / SonarCloud

Credentials should not be hard-coded High

Revoke and change this password, as it is compromised. See more on SonarQube Cloud
Co-authored-by: mpchenette <98562887+mpchenette@users.noreply.github.com>
@sonarqubecloud
Copy link

Please retry analysis of this Pull-Request directly on SonarQube Cloud

Copilot AI and others added 2 commits November 18, 2025 17:37
Co-authored-by: mpchenette <98562887+mpchenette@users.noreply.github.com>
Co-authored-by: mpchenette <98562887+mpchenette@users.noreply.github.com>
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
E Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copilot AI changed the title [WIP] Clean up repository structure and organize files Remove dead code, fix SQL injection, clean unused assets Nov 18, 2025
Copilot AI requested a review from mpchenette November 18, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants