File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
packages/pytest-simcore/src/pytest_simcore Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -58,13 +58,23 @@ def external_envfile_dict(
5858 term in envfile .name .lower () for term in ("ignore" , "secret" )
5959 ):
6060 _logger .warning (
61- "🚨 CAUTION: The file '%s' from '--external-envfile' may be versioned and exposed publicly . "
62- "Add 'secret' or 'ignore' to the filename to exclude it automatically ." ,
61+ "🚨 CAUTION: The external envfile '%s' may contain sensitive data and could be accidentally versioned . "
62+ "To prevent this, include the words 'secret' or 'ignore' in the filename." ,
6363 envfile .name ,
6464 )
6565
6666 envs = load_dotenv (envfile )
6767
68+ if envs :
69+ response = input (
70+ f"🚨 CAUTION: You are about to run tests using environment variables loaded from '{ envfile } '.\n "
71+ "This may cause tests to interact with or modify real external systems (e.g., production or staging environments).\n "
72+ "Proceeding could result in data loss or unintended side effects.\n "
73+ "Are you sure you want to continue? [y/N]: "
74+ )
75+ if response .strip ().lower () not in ("y" , "yes" ):
76+ pytest .exit ("Aborted by user due to external envfile usage." )
77+
6878 return envs
6979
7080
You can’t perform that action at this time.
0 commit comments