Skip to content

Issue/718 default sg rule - #748

Merged
mbuechse merged 26 commits into
mainfrom
issue/718_default_sg_rule
Nov 8, 2024
Merged

mbuechse merged 26 commits into
mainfrom
issue/718_default_sg_rule

Conversation

@fraugabel

Copy link
Copy Markdown
Contributor

added alternative test, because the current test only works for the latest versions of the network and compute services, though older versions are not depricated yet

@mbuechse mbuechse left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error handling should be improved (don't just swallow exceptions by printing something to stdout), assert statements should not be used in production, and I suppose the code can be made less redundant and more concise.

@mbuechse

mbuechse commented Oct 25, 2024 •

Copy link
Copy Markdown
Contributor

BTW, I noticed that the test script is incredibly noisy when --debug is used. Okay, probably fine. However, logging is not initialized, so the channel is not included in the log line. This should be changed -- please include the following line:

    logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)

And if --debug is supplied, the following must be done:

    logging.getLogger().setLevel(logging.DEBUG)

Last not least, the output of the script is not usable in any way. What we need is the following:

  • for every violation of a requirement: output a message on the ERROR channel
  • for every violation of a recommendation: output a message on the WARNING channel
  • the return code should be non-zero precisely when an ERROR had been emitted

Every other output should be on the debug or info channel.

@mbuechse mbuechse left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I massaged it a bit. LGTM -- please check whether it looks good to you, too.

Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
fraugabel and others added 6 commits November 8, 2024 08:40
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Katharina Trentau <[email protected]>
Signed-off-by: Matthias Büchse <[email protected]>
Signed-off-by: Matthias Büchse <[email protected]>
@mbuechse
mbuechse force-pushed the issue/718_default_sg_rule branch from 25e1c3c to 24760a7 Compare November 8, 2024 08:40
This reverts commit 1092abe.

Signed-off-by: Matthias Büchse <[email protected]>
@mbuechse
mbuechse force-pushed the issue/718_default_sg_rule branch from 232aec7 to 546c89d Compare November 8, 2024 08:45
@mbuechse
mbuechse merged commit 4ca42f9 into main Nov 8, 2024
@mbuechse
mbuechse deleted the issue/718_default_sg_rule branch November 8, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make compliance test for scs-0115-v1: Default Rules for Security Groups downward compatible

2 participants