Skip to content

Conversation

@blackheaven
Copy link
Collaborator


Advisory

  • It's not duplicated
  • All fields are filled
  • It is validated by hsec-tools

hsec-tools

  • Previous advisories are still valid

@blackheaven blackheaven force-pushed the feat/relayout-advisories branch 3 times, most recently from 569d5e9 to edaafc9 Compare August 7, 2025 21:45
@blackheaven blackheaven marked this pull request as ready for review August 7, 2025 21:56
Copy link
Collaborator

@frasertweedale frasertweedale left a comment

Choose a reason for hiding this comment

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

The symbolic links need fixing up, but otherwise I'm happy to merge this.

I think we should have a fsck command to validate the symlinks - i.e. that all symlinks point to a matching advisory in the published tree, and that all affected components have inbound symlinks in the ghc or hackage tree. But that can be done in a subsequent PR.

@blackheaven blackheaven force-pushed the feat/relayout-advisories branch from edaafc9 to ae8229c Compare September 6, 2025 10:49
@blackheaven
Copy link
Collaborator Author

The symbolic links need fixing up, but otherwise I'm happy to merge this.

I think it's builtin git, here's the script I have used:

mkdir -p advisories/published/{2023,2024,2025}
find advisories/{ghc,hackage} -type f \
    | while read -r f; do \
    target=$(echo "$f" | sed -E 's|.*/HSEC-([0-9]+)-([0-9]+)\.md|advisories/published/\1/\2.md|') 
    git mv "$f" "$target"
    touch "$f"
done
find advisories/{ghc,hackage} -name '*.md' \
    | while read -r f; do \
    target=$(echo "$f" | sed -E 's|.*/HSEC-([0-9]+)-([0-9]+)\.md|advisories/published/\1/\2.md|') 
    ln -sf "$target" "$f"
    git add "$f"
done

Let me know if you have an idea to fix linking.

Thanks in advance.

@mbauman
Copy link

mbauman commented Sep 12, 2025

My apologies for a fly-by question from an outsider here, but I've been taking inspiration from your design here for the Julia ecosystem (in following a great tradition :)). Would you be willing to share a bit about the rationale for this reorg — or have you described this in some place I have yet to find? I can definitely see a number of advantages! Are the symbolic links for backwards compatibility or UX (for advisory authors or maintainers or consumers?) or some other reason?

I know this is active work, and I know describing it is also work, but I just happen to be concurrently thinking about issues exactly like this. In any case, thank you for all you've done here — this is already quite helpful!

@frasertweedale
Copy link
Collaborator

My apologies for a fly-by question from an outsider here, but I've been taking inspiration from your design here for the Julia ecosystem (in following a great tradition :)). Would you be willing to share a bit about the rationale for this reorg — or have you described this in some place I have yet to find? I can definitely see a number of advantages! Are the symbolic links for backwards compatibility or UX (for advisory authors or maintainers or consumers?) or some other reason?

I know this is active work, and I know describing it is also work, but I just happen to be concurrently thinking about issues exactly like this. In any case, thank you for all you've done here — this is already quite helpful!

We already supported symbolic links - because a single advisory can affect multiple packages. But previously, the actual advisory files would reside in (one of) the package-based paths.

The main motivation for this change is to have the canonical advisory content at a location derived from the advisory ID (HSEC-YYYY-NNNN). This lets us play more nicely with osv.dev and any other system that wants to "link back" to the advisory source without knowing anything about Haskell package/component namespaces. We retain package-based paths but they will now all be symbolic links.

See #252 and google/osv.dev#2191 for more context.

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.

4 participants