Skip to content

add a blacklist, in addition to the whitelist #3

@calestyo

Description

@calestyo

Hi.

AFAIU, the program is right now purely whitelist based, i.e. if the command matches a single regexp in the config file, it's allowed.

I think it would be great to have a blacklist in addition, which supersedes any grants of the whitelist.
That would be handy to disallow symbols or strings, which are known to be exploitable in certain circumstances (like "..", or "$(" or things like that.

The blacklist could be used in two ways:

  1. just removing any grants made by the whitelist, without allowing anything if not blacklisted and the whitelist is empty
  2. the other way round, i.e. if the whitelist is empty, everything is allowed unless blacklisted.

If (2) is implemented in addition, then it should really be an option that needs to be passed to restricted-ssh-commands to activate that mode, cause if it's automatically enabled, just when the whitelist file is empty or not found, that would be too error prone.

Cheers,
Chris.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions