Skip to content

fix: update link generation for alert titles in content.htm#285

Merged
YamatoSecurity merged 3 commits intomainfrom
280-fix-link-error
Dec 18, 2025
Merged

fix: update link generation for alert titles in content.htm#285
YamatoSecurity merged 3 commits intomainfrom
280-fix-link-error

Conversation

@fukusuket
Copy link
Collaborator

@fukusuket fukusuket commented Dec 18, 2025

Closed #280
I expect this issue to be resolved with this fix. Could you please confirm?🙏
When verifying the fix, we need to run cp -r template ./takajo/ in advance.

Integraion-Test

@fukusuket fukusuket requested a review from Copilot December 18, 2025 03:50
@fukusuket fukusuket self-assigned this Dec 18, 2025
@fukusuket fukusuket added the bug Something isn't working label Dec 18, 2025
@fukusuket fukusuket added this to the v2.15.0 milestone Dec 18, 2025
@fukusuket fukusuket marked this pull request as ready for review December 18, 2025 03:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes link generation for alert titles in the detection rule list by constructing the correct URL with query parameters instead of using raw file paths. The change replaces the direct use of rule[1] (which contains the file path from the database) with a properly formatted URL pattern that matches the API endpoint expectations.

Key Changes

  • Changed from using rule[1] (file path) to constructing a URL with "rule/content?alert_title=" + rule[0] where rule[0] is the alert title
  • This aligns the link construction with the expected API endpoint pattern defined in src/takajopkg/web/controllers/rules.nim

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@YamatoSecurity
Copy link
Collaborator

@fukusuket Thanks! Can you explain more about how I need to run cp -r template ./takajo/ in advance?

I have a templates folder inside of my takajo directory already.
I am still getting this format of link: http://localhost:8823/hayabusa/rules/sigma/sysmon/pipe_created/pipe_created_hktl_cobaltstrike.yml

@fukusuket
Copy link
Collaborator Author

fukusuket commented Dec 18, 2025

@YamatoSecurity
This fix meant that, since it was a change to templates/static/content.htm, it was necessary to copy templates/static/content.htm! (Copying the takajo binary would not apply this fix.)

Copy link
Collaborator

@YamatoSecurity YamatoSecurity left a comment

Choose a reason for hiding this comment

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

@fukusuket I see, LGTM! Thanks so much!!

@YamatoSecurity YamatoSecurity merged commit 08d4caa into main Dec 18, 2025
2 checks passed
@YamatoSecurity YamatoSecurity deleted the 280-fix-link-error branch December 18, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Rule links not working under computer report in html-server

3 participants