Skip to content

Conversation

@shreyakash24
Copy link
Contributor

@shreyakash24 shreyakash24 commented Dec 28, 2025

Description

Many Makefile targets in OpenCRE fail when the project directory path contains spaces (e.g. ~/git folder/OpenCRE).
This happens because unquoted shell paths are expanded incorrectly by the shell.

Commands such as make e2e, make test, make import-neo4j rely on FLASK_APP and other path-based variables, which are set without proper quoting.


Steps to Reproduce

  1. Clone the repository into a directory with spaces:
    git clone https://github.com/OWASP/OpenCRE.git "~/git folder/OpenCRE"
  2. Create and activate a virtual environment inside the project directory:
    python3 -m venv venv
    source venv/bin/activate
  3. Run any of the following:
    make test
    make e2e
    make migrate-upgrade
    

Observed Behavior

  • Shell fails to correctly resolve paths containing spaces.
  • Error occurs,
    Image
      /bin/sh: line 0: export: `folder/OpenCRE/cre.py': not a valid identifier
      make: *** [test] Error 1
    
  • FLASK_APP points to an invalid path when expanded.

Expected Behavior

  • Makefile targets should work regardless of whether the project path contains spaces.
  • Shell commands should correctly resolve paths.

Suggested fix

Quote path-based variables when exporting them in Makefile targets, for example:

 export FLASK_APP="$(CURDIR)/cre.py"

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.

1 participant