Ksconf

Latest version: v0.13.9

Safety actively analyzes 638437 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 12

0.11.6

~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Introducing plugin functionality using `pluggy`_ plugin management system.
This adds a small, single-package dependency that can greatly increase customization potential of ksconf.
The first demo of this can be seen in the ``ksconf-jinja-markdown`` package that enables ``.j2`` payloads to be rendered by registering a custom Jinja filter named ``markdown2html``.

0.11.5

~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Use atomic file operations for more updates (such as most ``.conf`` writing and app packaging).
This is enabled by the new context managers :py:func:`~ksconf.util.file.atomic_writer` and :py:func:`~ksconf.util.file.atomic_open`.
Under the covers temporary files are written to and then renamed into place to ensure that the output file is either fully updated or not touched at all.
This should reduce possible data loss and/or confusion during some difficult to handle corner cases (i.e., disk full, or interrupted execution).
* Add new :py:func:`~ksconf.conf.parser.parse_string` function to enable simple parsing from a string.
(I'm not sure why it took me so long to add this; it's so simple; and I've looked for this function dozens of times over the years, and always came up with a new StringIO workaround.)
* App Manifest changes:

* App manifest file format was updated to v2 which reports file mode as as familiar octal (string) instead of an integer.
This is easier to read in most cases.
* Add API level improvements to support reading/writing manifests when the archive is using a temporary filename.

* Improved various error messages, minor optimizations, and some minor security improvements.

0.11.4

~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Updated Jinja2 support to allow variables to be passed in for the ``combine`` and ``package`` operations.
To use Jinja2 rendering feature, use the ``--enable-handler=jinja`` option.
Forcing users to op-in to this behavior seems to be safest option moving forward.
To feed variables into the Jinja2 rendering process, use the ``--template-vars`` option.
Either pass a literal value or ``filename``.
Currently JSON literals as well as ``.json``, ``.yaml`` and ``.conf`` files.
* Minor output fixes for ``combine`` (failed variable substitution)
* Rename LayerConfig to :py:class:`~ksconf.layer.LayerContext`. I doubt anyone is using this, but just in case.

0.11.3

~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Initial support for rendering Jinja2 templates in app layers, which can be used for app packaging and combine operations.
This isn't really exposed via the CLI yet.
Notice that if you have ``*.j2`` files in your apps that are NOT Jinja2 templates, this could cause problems for you.
There's no way to disable this functionality as of yet.
* Move ``.conf`` and ``.spec`` combine handlers into handler functions.
This makes it easier to supporting additional file types with special merge-handling logic in the future and simplifies the code into smaller units.
* More internal embracing of pathlib and typing.

0.11

-----------

**Highlights:**

* Ksconf is beginning to treat Splunk apps more holistically and not just as a collection of ``.conf`` files.
* Significant portions of this new code base is directly leveraged by the Ansible modules located in the `cdillc.splunk`_ collection, a sibling project to Ksconf.
some of the code code there has made it's way into the core ksconf project in this release.


**API Changes**

* Added :py:class:`~ksconf.app.facts.AppFacts` to easily collect Splunk application name, version, label, and other nuggets from ``app.conf``.
* Added :py:class:`~ksconf.app.manifest.AppManifest` to inventory the contents of a Splunk application and create a unique content fingerprint that can be used to quickly identify application changes.
* Added :py:mod:`ksconf.app.deploy` to assist with Splunk application deployment planning and execution.
* Added :py:class:`ksconf.hookspec.KsconfHookSpecs` to define all available `pluggy`_ integration points.
Anyone wanting to implement a new plugin should use the public-facing :py:mod:`ksconf.hook` module.

0.11.0

~~~~~~~~~~~~~~~~~~~~~~~~~~~

* First release of all ``ksconf.app.*`` functionality!
* The ``unarchive`` command has been updated to use the new functionality.
* More embracing of Python 3, f-strings, and pathlib!

NOTE: If you don't need for the new Splunk app functionality, there's little value in upgrading to v0.11. There's no new CLI features exposing this new functionality yet.

Disregard version v0.11.1, and v0.11.2 has minor internal fixes and shouldn't be broadly used. They were also released on 2023-05-13.

Page 4 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.