-
Notifications
You must be signed in to change notification settings - Fork 83
Creates doc:reference to capture references and citations #4631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: synapse-3xx
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## synapse-3xx #4631 +/- ##
============================================
Coverage 96.70% 96.70%
============================================
Files 254 254
Lines 60762 60762
============================================
Hits 58759 58759
Misses 2003 2003
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
synapse/models/doc.py
Outdated
| ('referrer', ('doc:referrer', {}), { | ||
| 'doc': 'The source which contains the reference.'}), | ||
|
|
||
| ('citation', ('str', {}), { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might have decided to avoid the use of citation and just use text for now to be able to capture "link text" without needing to debate whether or not it's an actual citation ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. I also removed all other references to citation/cited/etc., and tried to generalize the doc strings.
therealsilence
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof interfaces
synapse/models/base.py
Outdated
| 'doc': 'Properties common to forms which are created on a per-source basis.', | ||
| 'template': {'title': 'item'}, | ||
| 'interfaces': ( | ||
| ('doc:referrer', {}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the forms that meta:reported applies to (risk:threat, ,ou:campaign, etc.), adding the doc:referrer interface doesn't feel right - feels like a shoehorn to make MITRE "fit". It's almost like there should be a notional doc:report for MITRE (e.g., a notional threat profile) that has the references, not MITRE's risk:threat node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, that kinda breaks the "multiple nodes to represent one thing" and makes an additional level of indirection JUST to allow those references. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interface was removed, and a list of specific forms has been added.
synapse/models/doc.py
Outdated
| 'doc': 'Properties common to authorable forms.', | ||
| 'template': {'title': 'document'}, | ||
| 'interfaces': ( | ||
| ('doc:referrer', {}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the doc:authorable and doc:document (inherits doc:authorable) forms, some of these feel...pointy. Referrer props "mostly" fit doc:document forms, but doc:authorable includes Snort & YARA rules, it:software, etc. where I have to squint harder. Are we okay with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interface was removed, and a list of specific forms has been added.
No description provided.