Skip to content

Sync/origin#22

Closed
zhangtianqi-james wants to merge 3 commits intoellipse2v:mainfrom
zhangtianqi-james:sync/origin
Closed

Sync/origin#22
zhangtianqi-james wants to merge 3 commits intoellipse2v:mainfrom
zhangtianqi-james:sync/origin

Conversation

@zhangtianqi-james
Copy link
Copy Markdown

No description provided.

Zhang Tianqi and others added 3 commits April 17, 2026 20:28
- 在 report_generator.py 中添加 GDAF 运行代码(项目模式)
- 添加辅助方法 _resolve_gdaf_context 和 _resolve_bom_directory
- 在 generate_global_project_report 中复制 gdaf_scenarios 到 dummy_model
- 在 export_service.py 中删除重复的 GDAF 代码(已移到 report_generator)
Addresses code duplication identified in PR ellipse2v#21 review.

The _resolve_gdaf_context() and _resolve_bom_directory() methods
were duplicated across ExportService and ReportGenerator. This
change extracts both methods to threat_analysis/utils.py as
standalone functions and updates both services to import from there.

Benefits:
- Single source of truth for path resolution logic
- Easier maintenance - changes apply to both services
- Prevents future drift between duplicate implementations
- Follows DRY principle

The generate_global_project_report() method now includes a comment
documenting the ordering invariant for all_models[0] being the
main threat model, as recommended in the review.

Also updated AIService._load_model_context() docstring to reference
the new location of the resolution logic.

Refs: PR ellipse2v#21
@ellipse2v
Copy link
Copy Markdown
Owner

hi @zhangtianqi-james hi think it's the same PR as PR21 with a rebase ? is it a mistake ? what do you think about the tool ? what do you want to have ? thanks regards

@zhangtianqi-james zhangtianqi-james deleted the sync/origin branch April 20, 2026 01:08
@zhangtianqi-james
Copy link
Copy Markdown
Author

Hi @ellipse2v,

I sincerely apologize for this confusion. This PR was created unintentionally due to a misunderstanding of GitHub's fork synchronization mechanism.

What happened:

  • I have a personal fork of this repository at zhangtianqi-james/SecOpsTM
  • A sync/origin branch was created in my fork (possibly through an automated sync process or previous experimentation)
  • This branch triggered PR Sync/origin #22, which was never intended to be submitted to the upstream repository

Resolution:

  • I have already deleted the sync/origin branch from both my local and remote repositories
  • The PR should be automatically closed by GitHub once the source branch is removed
  • No changes from this PR should be merged as it was an accidental submission

What I'm doing:

  • Cleaning up my fork to prevent similar occurrences
  • Being more careful with fork synchronization in the future

I take full responsibility for this mistake and apologize for any confusion or noise it may have caused. I truly appreciate the work you do maintaining this project, and I'm sorry for the inconvenience.

@ellipse2v
Copy link
Copy Markdown
Owner

Hey @zhangtianqi-james
No worries at all — that's exactly what reviews are for! 😊

I really appreciate your involvement. I'm looking for people who are able to test the tool, put it through its paces in real-world scenarios, and help identify what can be improved — so please don't hesitate to keep exploring the project.

Thanks for the clear explanation and for cleaning things up so quickly. See you around on the project!

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