Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
uniorg-attach
Advanced tools
uniorg-attach
uniorg plugin to convert attachment:
links to file:
links.
npm install --save uniorg-attach
If we have the following example.org
file:
:PROPERTIES:
:ID: eae6a180-58d3-44b9-9c95-d8924849d365
:END:
attachment:file.txt
and
import { unified } from 'unified';
import toVFile from 'to-vfile';
import uniorgParse from 'uniorg-parse';
import { uniorgAttach } from 'uniorg-attach';
import uniorg2rehype from 'uniorg-rehype';
import html from 'rehype-stringify';
unified()
.use(uniorgParse)
.use(uniorgAttach)
.use(uniorg2rehype)
.use(html)
.process(toVFile.readSync('./example.org'), function (err, file) {
console.log(file.toString());
});
will output
<p><a href="file:data/ea/e6a180-58d3-44b9-9c95-d8924849d365/file.txt">file:data/ea/e6a180-58d3-44b9-9c95-d8924849d365/file.txt</a>
</p>
idDir
Type: string?
Default: "data/"
The directory where attachments are stored. If this is a relative path, it will be interpreted relative to the directory where the Org file lives.
Corresponds to org-attach-id-dir
in Emacs.
useInheritance
Type: boolean?
Default: false
NOTE: In Emacs, the default is
'selective
which means that Emacs will look atorg-use-property-inheritance
to check whetherID
andDIR
properties are inherited. uniorg-attach does not currently do that. This shouldn’t cause any troubles unless you inherit one property but not the other.
Attachment inheritance for the outline.
Enabling inheritance for implies that attachment links will look through all parent headings until it finds the linked attachment.
Corresponds to org-attach-use-inheritance
in Emacs.
idToPath
Type: (id: string) => string
Default: idUuidFolderFormat
A function parsing an ID string into a folder-path.
Similar to org-attach-id-to-path-function-list
in Emacs, but only allows one function.
This module exports idUuidFolderFormat
and idTsFolderFormat
that re-implement two common behaviors for org-attach.
FAQs
Uniorg plugin to process org-attach attachment links
The npm package uniorg-attach receives a total of 57 weekly downloads. As such, uniorg-attach popularity was classified as not popular.
We found that uniorg-attach demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.