( nagyjoco | 2025. 11. 20., cs – 13:24 )

Teljesen felesleges a home labemben ketyegő gitlab repoba küldött kommitjaimat digitálisan aláírni. Aláírni enterprise környezetben van értelme, és ott viszont enterprise megoldások vannak erre. Minimális hozzáértés mellett ennek a megvalósítása sehol nem okoz problémát. 

Ami viszont gáz, és komoly security probléma, az az, hogy hiába írod alá a commitokat , ha nem írod alá a tageket:

git verify-tag postgresql@v0.15.0_2025
error: no signature found

Igen csúnya dolgokat lehet így művelni, ráadásul ha egyszer lennének felhasználóid, azok pont hogy tageket fognak deployolni, nem commitokat.... Ráadásul a commitokat sem okosan írod alá, de ebbe most bele se menjünk.

Nézd, tudtommal én vagyok az egyetlen itt, aki leklónozta a művedet otthonra és bele is nézett a kódba. 
Sőt, ráküldtem a rendkívül megtévesztő módon elnevezett compiler.py nevű Pyton nyelven írt szösszenetedre a Claude-t, laza 35 problémát azonosított - egy importokkal együtt 300 soros kódban... Köztük igen csúnyákat is.

Szóval  polkorrektül fogalmazva vannak még fejlődési lehetőségek security, QA és programozás terén, 
 

Code Analysis: Problems and Bugs in compiler.py

Summary Statistics

  • Total Issues Found: 35
  • Critical: 2
  • High: 5
  • Medium: 4
  • Low: 24

Critical Issues

#SeverityCategoryLocationProblemImpact
1CRITICALLogic Errorrun_release() lines 259-262The final release block is never actually written to project.yaml. The code creates final_release_block with signature but then writes release_block_for_hashing (without signature) insteadRelease signature is lost, making the entire signing process pointless
2CRITICALSecurityrun_release() line 260Hardcoded placeholder signature 'XyyyyX' is written instead of actual vault signatureNo real cryptographic signature is created, defeating security purpose
3HIGHLogic Errorvalidate_release_prerequisites() lines 144-146Component name sanitization uses re.sub(r'main$', '', raw_component_name) which removes 'main' from end but the pattern should match '/main' or '|main' as per commentIncorrect component name extraction if format doesn't match expectations
4HIGHResource Leakget_reproducible_repo_hash() lines 29-49Multiple subprocess pipes created but not all are properly closed. Only archive_proc.stdout is closedCan cause pipe buffer deadlocks or resource exhaustion
5HIGHError Handlingget_reproducible_repo_hash() line 46Only checks b64_proc.returncode but not archive_proc or digest_proc returncodesSilent failures in git archive or openssl dgst could pass undetected
6HIGHUnused Variablerun_release() lines 215-223vault_addr, vault_token, vault_cacert, and verify_tls are set up but never usedDead code that suggests incomplete implementation
7MEDIUMLogic Errorvalidate_release_prerequisites() lines 177-180Condition allows ANY version as first release if condition is not met (patch !=0 or minor !=0). Should enforce 0.0.0, 0.1.0, or 1.0.0Could allow invalid first versions like 5.7.3
8MEDIUMIncomplete Featurerun_release() line 261'release': f"{repo_hash[:12]}" creates a truncated hash field that's never validated or usedUnclear purpose, potential confusion with repository_tree_hash
9MEDIUMRace Conditionrun_release() lines 232-235Git operations (add, write-tree) happen before timestamp is written, but timestamp is calculated firstIf script pauses between operations, timestamp may not reflect actual commit time
10LOWCode QualityMultiple functionsNo type hints on any function parameters or returnsReduces code maintainability and IDE support
11LOWCode Smellvalidate_release_prerequisites() lines 151-152Debug print statements left in code (print(f"'{raw_component_name}'") and print(f"'{component_name}'"))Clutters output, suggests incomplete development
12LOWError Messagerun_release() line 221Warning message has ANSI color codes hardcodedMay not display correctly on all terminals

Medium Priority Issues

#CategoryLocationProblem
13Edge Caseload_yaml() line 23No error handling for malformed YAML files
14Edge Casewrite_yaml() line 29No error handling for write failures (disk full, permissions)
15Inconsistencyrun_release() line 227Deletes 'release' block but doesn't verify it exists before deletion
16API Usagevalidate_release_prerequisites() line 159Uses semver.Version.parse() without checking if tag format is valid
17User Experiencerun_release() line 264Message tells user to commit and tag but doesn't mention they should review changes first
18DocumentationThroughoutNo docstring details about parameters, return types, or exceptions raised

Low Priority Issues

#CategoryLocationProblem
19Code StyleMultiple locationsInconsistent string quote usage (both single and double quotes)
20Magic Numbersrun_release() line 261Hardcoded [:12] for hash truncation appears multiple times
21Code Organizationrun_release()Function is too long (~80 lines) with multiple responsibilities
22Error Handlingmain() line 275Generic error handling doesn't distinguish between different command types
23Validationvalidate_release_prerequisites() line 192Patch version check new_version.patch == 0 for minor increment is correct but not explicitly validated for major
24Securityrun_release() line 220Setting verify_tls = False in development creates bad habits

Potential Runtime Errors

#ConditionLocationProblem
25Missing Config Keyload_project_config() line 13Assumes 'compiler_settings' key exists in project.yaml
26Empty Git Tagsvalidate_release_prerequisites() line 172If git tags output is empty string, split returns [''] not []
27Invalid Semvervalidate_release_prerequisites() line 159Tag parsing could fail if tag doesn't contain '@v' separator
28Subprocess Hangget_reproducible_repo_hash() lines 29-47If one subprocess fills its buffer and blocks, could cause deadlock
29ANSI Code RenderingMultiple locationsANSI color codes may not render in all environments

Design Issues

#CategoryProblemImpact
30ArchitectureVault integration is stubbed but incompleteRelease signatures don't work at all
31ConfigurationGlobal CONFIG loaded at module levelMakes testing difficult, creates hidden dependencies
32State ManagementMultiple git operations modify working directory stateIf script fails mid-execution, repo left in inconsistent state
33LoggingUses print statements instead of logging moduleCan't control log levels or redirect output properly
34TestingNo visible test infrastructureCode quality and correctness can't be verified
35Schema ValidationMeta-schema validation doesn't validate nested schemasCould miss errors in schema definitions

Top 3 Must-Fix Issues

  1. Issue #1: The release signature is never actually written to the file - this breaks the entire release mechanism
  2. Issue #2: Placeholder signature instead of real Vault signing - security vulnerability
  3. Issue #3: Component name extraction logic doesn't match the documented behavior in comments

Recommendations

  1. Immediate: Fix issues #1, #2, and #3 before any production use
  2. Short-term: Implement proper error handling, logging, and complete the Vault integration
  3. Long-term: Refactor into smaller modules, add comprehensive tests, improve documentation