CSAF::Writer(3pm)

πŸ“¦
version 0.26 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– CSAF::Writer πŸ’–

okay bestie, welcome to CSAF::Writer, a lil Perl module from the User Contributed Perl Documentation corner of the universe. she writes CSAF documents and then distributes them. no cap. she's giving main character energy for your advisory pipeline. πŸŽ€


✨ NAME ✨

CSAF::Writer β€” Write and distributes CSAF documents πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

use CSAF::Writer;

my $writer = CSAF::Writer->new(
    csaf      => $csaf,
    directory => '/var/www/html/advisories/csaf'
);

$writer->options->configure(
    create_gpg_signature => 1
    gpg_key              => '0123456789',
    gpg_passphrase       => 'MY_C00L_Passphrase!'
);

if ($writer->write) {
    say "CSAF document created";
}

like, look at her go 🫢


🌸 DESCRIPTION 🌸

so CSAF::Writer covers most of the requirements of "Distributing CSAF documents". not all, but most. she ate, honestly.

the requirements she's handling:

  • 7.1.2 Requirement 2: Filename
  • 7.1.11 Requirement 11: One folder per year
  • 7.1.12 Requirement 12: index.txt
  • 7.1.13 Requirement 13: changes.csv
  • 7.1.18 Requirement 18: Integrity
  • 7.1.19 Requirement 19: Signatures

the spec herself lives here if you wanna vibe check it:

<https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html>


🧚 METHODS 🧚

CSAF::Writer inherits all methods from CSAF::Base and implements the following new ones. so yeah, she got the whole family tree, plus her own glow-up moves ✨


🌟 $writer->write ( $directory_path ) 🌟

Write the CSAF document in the specified $directory and create this structure:

[ ROOT ]
   |
   |--> [ YEAR ]
   |       |--> CSAF document (.json)
   |       |--> SHA256 integrity file (.sha256)
   |       |--> SHA512 integrity file (.sha512)
   |       \--> GPG signature file (.asc)
   |
   |--> Index file (index.txt)
   \--> Changes file (changes.csv)

this directory structure is "ready" to be published through in webserver (Apache, NGINX and others) via "HTTPS". literally plug and play bestie πŸ”₯

$writer->write('/var/www/html/advisories/csaf');

🌟 $writer->options 🌟

Change the default options for CSAF::Options::Writer configurator. lowkey the control panel of the whole operation πŸ’…

$writer->options->configure(
    create_sha256_integrity => 0,
    create_gpg_signature    => 1,
    update_index            => 1,
    update_changes          => 1
);

if (my $passphrase = get_passphrase_from_stdin) {
    $writer->options->gpg_passphrase($passphrase);
}

πŸŽ€ SUPPORT πŸŽ€

πŸ› Bugs / Feature Requests πŸ›

Please report any bugs or feature requests through the issue tracker at <https://github.com/giterlizzi/perl-CSAF/issues>. You will be notified automatically of any progress on your issue. so you're never just screaming into the void, fr fr πŸ™ˆ

πŸ“¦ Source Code πŸ“¦

This is open source software. The code repository is available for public review and contribution under the terms of the license.

<https://github.com/giterlizzi/perl-CSAF>

git clone https://github.com/giterlizzi/perl-CSAF.git

πŸ‘‘ AUTHOR πŸ‘‘

  • Giuseppe Di Terlizzi <gdt@cpan.org>

This software is copyright (c) 2023-2025 by Giuseppe Di Terlizzi.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


okay that's the whole page bestie, we're done here πŸ’– and just so you know where this came from: this one's running on perl v5.40.1, dated 2025-09-03, and it's the manpage for CSAF::Writer(3pm). go write some advisories, slay πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from