Skip to content

Evaluate Canonical value of security.txt ? #772

Closed

Description

@baknu

Currently we do not check the value of the Canonical fields, because we find that its meaning is unclear in the security.txt specification. The latter is only the case when redirects are involved.

This issue is to get more clearity on its meaning when redirects are invloved, and also to discuss if and how we can add a check for this.

Note 1: Clarification question was already asked on securitytxt/security-txt#217
Note 2: The sectxt parser now uses the following interpretation: ""Web URI where security.txt is located must match with a 'Canonical' field. In case of redirecting either the first or last web URI of the redirect chain must match.""

Activity

  1. added
    enhancementIssues that suggest slight improvements to existing code, tests, etc.
    contentChange (needed) to the content repository alongside with this issue/PR
    on Oct 21, 2022
  2. added this to the v1.7 milestone on Oct 21, 2022
  3. WKobes commented on Jan 30, 2023

    @WKobes
    Collaborator

    For the Dutch government this could also identify incorrect redirects.

    E.g. https://www.rijksoverheid.nl/.well-known/security.txt would fail because the Canonical URL is https://www.ncsc.nl/.well-known/security.txt

  4. modified the milestones: v1.7, v1.8 on Mar 7, 2023
  5. mxsasha commented on Apr 11, 2023

    @mxsasha
    Collaborator

    If we finally want to do this, we first need to make a final decision on what we see as the requirements for Canonical. We've been pingponging on this for months now :)

  6. mxsasha commented on Apr 18, 2023

    @mxsasha
    Collaborator

    Final decision:

    • If a (or multiple) Canonical field is present, regardless of signature, the last URL in the redirect chain must be listed in a Canonical field, including query string if present.
    • If the file is signed, one or more Canonical fields must be present - already tested.
  7. added a commit that references this issue on Apr 26, 2023
    2be3553
  8. mxsasha commented on Apr 26, 2023

    @mxsasha
    Collaborator

    #959 adds this and also updates the dependency to 0.8.3.

    @baknu we need new labels for errors no_canonical_match, no_csaf_file and multiple_csaf_fields and probably need to update the test description.

    As before, DTC's wording does not have to match ours, we only use the same error code. Our interpretation of no_canonical_match is different from DTC, so we definitely should not reuse their error message text there. But I also think their proposed texts for CSAF are not very clear.

  9. added a commit that references this issue on Apr 26, 2023
    f8358c4
  10. 11 remaining items

  11. baknu commented on Oct 7, 2023

    @baknu
    ContributorAuthor

    @mxsasha It seems better to wait and do this when we upgrade to the upcoming sectxt version 0.9.1 (see #1046). Right?

  12. modified the milestones: v1.8, v1.9 on Oct 7, 2023
  13. mxsasha commented on Oct 9, 2023

    @mxsasha
    Collaborator

    @mxsasha It seems better to wait and do this when we upgrade to the upcoming sectxt version 0.9.1 (see #1046). Right?

    The canonical check is already done. The code is merged, we are upgraded to 0.8.3 in #959 and the bug I mentioned on June 8th is fixed. Only content is pending, included in https://github.com/internetstandards/Internet.nl_content/pull/41

  14. modified the milestones: v1.9, v1.8 on Oct 10, 2023
  15. baknu commented on Oct 11, 2023

    @baknu
    ContributorAuthor

    @mxsasha: Content is ready. Could you check? Thanks.

  16. added
    content doneChanges to the content repository for this PR are done
    and removed
    questionIssues that involve a question
    on Oct 11, 2023
  17. removed
    questionIssues that involve a question
    on Oct 26, 2023
  18. baknu commented on Oct 26, 2023

    @baknu
    ContributorAuthor

    Processed feedback from @mxsasha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

contentChange (needed) to the content repository alongside with this issue/PRcontent doneChanges to the content repository for this PR are doneenhancementIssues that suggest slight improvements to existing code, tests, etc.

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions