jrgemignani opened a new pull request, #2330:
URL: https://github.com/apache/age/pull/2330

   Note: This PR was created with AI tools and a human.
   
   - Add parameterized query construction using psycopg.sql to prevent SQL 
injection in all Cypher execution paths (age.py, networkx/lib.py)
   - Replace all %-format and f-string SQL in networkx/lib.py with 
sql.Identifier() for schema/table names and sql.Literal() for values
   - Add validate_graph_name() with AGE-aligned VALID_GRAPH_NAME regex: start 
with letter/underscore, allow dots and hyphens in middle positions, end with 
letter/digit/underscore, min 3 chars, max 63 chars
   - Add validate_identifier() with strict VALID_IDENTIFIER regex for labels, 
column names, and SQL types (no dots or hyphens)
   - Add validation calls to all networkx/lib.py entry points: graph names 
validated on entry, labels validated before SQL construction
   - Add _validate_column() to sanitize column specifications in buildCypher()
   - Fix exception constructors (AgeNotSet, GraphNotFound, GraphAlreadyExists) 
to accept optional arguments without crashing
   - Add InvalidGraphName and InvalidIdentifier exception classes with 
structured name/reason/context fields
   - Fix builder.py: change erroneous 'return Exception(...)' to 'raise 
ValueError(...)' for unknown float expressions
   - Fix copy-paste docstring in create_elabel() ('create_vlabels' -> 
'create_elabels')
   - Strip Windows carriage returns (^M) from 7 source files
   - Fix requirements.txt: convert from UTF-16LE+BOM+CRLF to clean UTF-8+LF, 
move --no-binary flag from requirements.txt to CI workflow pip command
   - Upgrade actions/setup-python from v4 (deprecated) to v5 in CI workflow
   - Add 46 security unit tests
   - pip-audit: 0 known vulnerabilities in all dependencies
   
   modified:   .github/workflows/python-driver.yaml
   modified:   drivers/python/age/VERSION.py
   modified:   drivers/python/age/__init__.py
   modified:   drivers/python/age/age.py
   modified:   drivers/python/age/builder.py
   modified:   drivers/python/age/exceptions.py
   modified:   drivers/python/age/models.py
   modified:   drivers/python/age/networkx/lib.py
   modified:   drivers/python/requirements.txt
   modified:   drivers/python/setup.py
   modified:   drivers/python/test_agtypes.py


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to