
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@bix-digital/directus-extension-version-control-changelog
Advanced tools
A Directus hook extension to push user written change summaries (from a singleton collection text field) to a changelog in a VCS server
This package is a Hook Extension for the CMS Directus that allows you to add entries to a changelog in a version control system. Currently only Bitbucket Server is supported, but it is prepared to be extended to other version control systems (like GitHub or GitLab) in the future.
Instead of just "blindly" adding each change in the database it relies on a user written changelog entry that summarizes the changes. For that it relies on a singleton collection with (at least) a textarea field in it.
We (BI X) created this extension because of the way how GatsbyJS with Directus as content source and our build system (OpenDevStack with ods-pipeline) work.
Our builds are triggered by webhooks that get fired on pushes to our VCS server. For that it relies heavily on the Bitbucket webhooks and its specific content. Recreating them with the Directus webhook functionality would have been a huge effort - and as our build system does not rebuild things if there are no changes (to the codebase / repository) it would also be without any effect.
Additionally we wanted to see what has changed in a new release - code as well as content.
That is why we decided to maintain a changelog inside of the VCS that can be updated by Directus. And for that we wrote this extension hook.
First you create a new collection in your Directus - make sure that the option to treat it as a single object is activated:
Then you add at least one textarea field and make sure that it is requiring content in there to be saved:
While the above shown is enough we recommend to use the features of Directus to give the content managers more guidance. Below you see our setup where we used the placeholder
and the note
of the textarea - as well as a readonly-field with an instructional message as default content:
The extension uses the configuration mechanism of Directus. So all you have to do is to add the following variables to your preferred configuration location:
Variable Name | Description |
---|---|
VERSION_CONTROL_CHANGELOG_COLLECTION | name of the collection (e.g. vcs_changelog ) |
VERSION_CONTROL_CHANGELOG_FIELD_NAME | name of the field in the collection (e.g. changes_made ) |
VERSION_CONTROL_CHANGELOG_VCS | Has to be bitbucket for now |
VERSION_CONTROL_CHANGELOG_BITBUCKET_USER | the user of the Bitbucket VCS server |
VERSION_CONTROL_CHANGELOG_BITBUCKET_PASSWORD | the password for the user above |
VERSION_CONTROL_CHANGELOG_VCS_SERVER_URL | the full URL of your VCS server - without a trailing / (e.g. https://your.vcs.example ) |
VERSION_CONTROL_CHANGELOG_VCS_PROJECT | the name of the project (or user) on the VCS server |
VERSION_CONTROL_CHANGELOG_VCS_REPOSITORY | the name of the repository of the project (or user) |
VERSION_CONTROL_CHANGELOG_VCS_BRANCH | the branch that should be used for reading and writing the changelog (e.g. cms-changes ) |
VERSION_CONTROL_CHANGELOG_VCS_FILENAME | the name of the file that should be used (e.g. directus-changelog.md ) |
Important: Make sure that the assigned Bitbucket user has write permissions in the repository.
There is no need to create the branch or the file in the repository, the extension takes care of this. This also means that in case you delete the file or the branch it will be automatically recreated on the next execution of the extension.
package.json
npm install
npm run build
version-control-changelog
inside of your <directus-root-folder>/extensions/hooks/
directoryindex.js
file from the dist
directoryIf everything works you will see the following line in the log output:
01:23:45 ✨ Version Control Changelog Extension Extension initialized, action handler registered
...
01:23:45 ✨ Server started at http://localhost:8055
Once you save your first changes in the configured collection & field the log should show you the following line:
17:32:16 ✨ Version Control Changelog Extension BitbucketVersionControl: new changelog pushed successful
If you see it: congratulations, your setup works!
2022-02-22
2022-02-14
These are things that would make sense, but it is not granted that it will be implemented
FAQs
A Directus hook extension to push user written change summaries (from a singleton collection text field) to a changelog in a VCS server
We found that @bix-digital/directus-extension-version-control-changelog demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.