CSAF::Writer(3pm)
π 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>
π LICENSE AND COPYRIGHT π
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
- ubuntu resolute: libcsaf-perl 0.26-1 Β· Artistic-2.0
- ubuntu stonking: libcsaf-perl 0.26-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms