Skip to content

test: validate n8n workflow compatibility - #60

Open
adnqcr7-code wants to merge 1 commit into
ikaruscareer:mainfrom
adnqcr7-code:test/n8n-workflow-compatibility
Open

test: validate n8n workflow compatibility#60
adnqcr7-code wants to merge 1 commit into
ikaruscareer:mainfrom
adnqcr7-code:test/n8n-workflow-compatibility

Conversation

@adnqcr7-code

Copy link
Copy Markdown
Contributor

What

Add a deterministic representative n8n workflow fixture and integration coverage for framework detection, workflow and node extraction, relationships, external APIs, databases, shell execution, and AI-model capabilities.

Also fix the n8n parser to handle the nested connection-array shape emitted by n8n exports.

Safety

The fixture uses a synthetic model and a placeholder credential reference only. It contains no tokens, passwords, private data, or live endpoints.

Test plan

  • python -m pytest tests/test_n8n_workflow.py -q
  • python -m pytest tests/test_claude_code_deep.py -q
  • python -m pytest tests -q
  • Result: 460 passed, 1 skipped

Fixes #56

@ikaruscareer ikaruscareer left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parser fix is critical, thanks. The nested connection-array shape fix addresses a real-world parsing gap that would cause false negatives in production scans.

Comment thread tests/test_n8n_workflow.py Dismissed

def test_representative_n8n_fixture_has_no_credential_values_or_private_endpoints():
workflow_path = os.path.join(FIXTURE, "workflow.json")
workflow_text = open(workflow_path, encoding="utf-8").read()

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some CI checks were not successful, "Ruff's SIM115 rule enforces proper file handle management".

@adnqcr7-code, can you please consider suggestion of using "with" keyword:

with open(workflow_path, encoding="utf-8") as f:
workflow_text = f.read()

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.

[Good First Issue] Validate SafeAI Analysis for n8n Workflows

3 participants