Skip to content

Sync src/syscred with 02_Code/syscred and fix SPARQL injection vulnerability#2

Merged
DominiqueLoyer merged 3 commits intomainfrom
copilot/continue-system-fact-checking
Feb 12, 2026
Merged

Sync src/syscred with 02_Code/syscred and fix SPARQL injection vulnerability#2
DominiqueLoyer merged 3 commits intomainfrom
copilot/continue-system-fact-checking

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

The src/syscred package (used by PyPI) was out of sync with 02_Code/syscred, causing NameError: name 'config' is not defined on initialization.

Changes

Package synchronization

  • Added missing modules: trec_retriever.py, trec_dataset.py, liar_dataset.py
  • Synced core modules: verification_system.py, config.py, __init__.py, graph_rag.py, eval_metrics.py

Security fix

  • Fixed SPARQL injection in graph_rag.py by adding _escape_sparql_string():
def _escape_sparql_string(self, value: str) -> str:
    result = value.replace('\\', '\\\\')
    result = result.replace('"', '\\"')
    result = result.replace("'", "\\'")
    # ... other escapes
    return result

Test updates

  • Tests now accept both v2.0 English labels (HIGH, MEDIUM, LOW) and v2.3.1 French labels (Élevée, Moyenne-Élevée, Moyenne, Faible-Moyenne, Faible)

Minor fixes

  • Corrected hardcoded path in liar_dataset.py from 02_Code/syscred/ to src/syscred/

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • whois.iana.org
    • Triggering command: /usr/bin/python python -c from syscred import CredibilityVerificationSystem system = CredibilityVerificationSystem() result = system.verify_information('REDACTED') print(f"Score: {result['scoreCredibilite']}") print(f"Level: {result['niveauCredibilite']}") (dns block)
    • Triggering command: /usr/bin/python python -m pytest tests/ -v -main/dist/index.js (dns block)
    • Triggering command: /usr/bin/python python -m pytest tests/ -v --tb=short (dns block)
  • www.bbc.com
    • Triggering command: /usr/bin/python python -c from syscred import CredibilityVerificationSystem system = CredibilityVerificationSystem() result = system.verify_information('REDACTED') print(f"Score: {result['scoreCredibilite']}") print(f"Level: {result['niveauCredibilite']}") (dns block)
    • Triggering command: /usr/bin/python python -m pytest tests/ -v -main/dist/index.js (dns block)
    • Triggering command: /usr/bin/python python -m pytest tests/ -v --tb=short (dns block)
  • www.nature.com
    • Triggering command: /usr/bin/python python -m pytest tests/ -v -main/dist/index.js (dns block)
    • Triggering command: /usr/bin/python python -m pytest tests/ -v --tb=short (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Peut on continuer avec systemFactChecking. Lis la documention


💡 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.

Copilot AI and others added 2 commits February 4, 2026 21:52
… labels

Co-authored-by: DominiqueLoyer <10522492+DominiqueLoyer@users.noreply.github.com>
Co-authored-by: DominiqueLoyer <10522492+DominiqueLoyer@users.noreply.github.com>
Copilot AI changed the title [WIP] Continue work on system fact checking Sync src/syscred with 02_Code/syscred and fix SPARQL injection vulnerability Feb 4, 2026
Copilot AI requested a review from DominiqueLoyer February 4, 2026 21:56
@DominiqueLoyer DominiqueLoyer marked this pull request as ready for review February 12, 2026 02:26
@DominiqueLoyer DominiqueLoyer merged commit 37d7f1a into main Feb 12, 2026
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