<blockquote>
<p>I am looking for a way for our members to submit scripts without fussing too much about format or folder structure.</p>
</blockquote>
<p>It sounds like you need some combination of testing and linting, perhaps with a few utility scripts to organise and gate content from landing in the repo.</p>
<p>The &quot;Vetting process&quot; you mention sounds to me exactly like &quot;tests need to pass on the scripts&quot;. A widely-used framework to write such tests is the Bash Automated Testing System - <a href="https://github.com/sstephenson/bats" rel="nofollow noreferrer">BATS</a>.</p>
<p>It would be up to you to write the tests to check whether, as you desire, these scripts are &quot;secure, compliant and won't create an issue&quot;, but at least you have a framework for generating and running them.</p>
<p>At a more superficial level, you could use the <a href="https://github.com/koalaman/shellcheck" rel="nofollow noreferrer">Shellcheck</a> linter to assert that any proposed new code adheres to whatever set of common rules you adopt in your community.</p>
<p>Pulling these together into a GitHub action (<em>e.g.</em> using <a href="https://github.com/github/super-linter" rel="nofollow noreferrer">https://github.com/github/super-linter</a>), or a git pre-commit hook <em>etc</em> could be a good way to add a quick inspection to new contributions, and help maintainers.</p>
<p>These would provide quantitative measures of correctness. In order to also provide some qualitative or more subjective measures of acceptance, this would depend greatly on the operating environment and which tools would fit naturally into yours.</p>
<p>However, some tools do attempt to address this need by design. Without further knowledge of the environment it's difficult to provide concrete answers, but here is a comparison of two options:</p>
<h2>GitHub, GitLab requests</h2>
<p>Assuming the code is destined for a GitHub or GitLab repo, GitHub or GitLab itself could of course be used as the &quot;review console&quot;. A contributor would fork the repo, send a new contribution in the form of a PR against the repo, and then the checks referred to above would be executed.</p>
<p>The actions could take care of the organisation, based on some internal convention, <em>e.g.</em> using labels, <em>i.e.</em> &quot;file scripts in PRs labelled <code>admin</code> in the <code>admin</code> directory&quot;.</p>
<h2>Gerrit</h2>
<p>Another purpose-built tool to manage code contributions is <a href="https://www.gerritcodereview.com/" rel="nofollow noreferrer">Gerrit</a>. Gerrit is heavily backed by git workflow and may not be relevant, but I mention it since it's one of the first such peer-review systems for software.</p>
<p>As described on the Gerrit website, a <a href="https://gerrit-review.googlesource.com/Documentation/intro-gerrit-walkthrough.html" rel="nofollow noreferrer">similar workflow is followed</a>:</p>
<blockquote>
<p>Making the Change</p>
<p>Creating the Review</p>
<p>Reviewing the Change</p>
<p>Reworking the Change</p>
<p>Verifying the Change</p>
<p>Submitting the Change</p>
<p>Next Steps</p>
</blockquote>
<p>Much of the actual work here is done by the reviewer or contributor, and Gerrit serves to organise their collaboration.</p>
<p>I suspect that neither of these corresponds exactly to what you are asking for, though, however a <strong>general purpose</strong> tool to which <strong>arbitrary</strong> contributions can be submitted is a big ask and likely a mirage.</p>
<p>It seems more feasible that this should be achieved by adopting shared conventions in existing code collaboration platforms rather than a dedicated service to manage ingestion.</p>
<hr />
<p>Finally, you mention:</p>
<blockquote>
<p>Usually when maintaining a system...</p>
</blockquote>
<p>If you meant &quot;maintaining a configuration state of a system&quot;, perhaps an approach with <a href="https://zuul-ci.org/docs/zuul/index.html" rel="nofollow noreferrer">Zuul</a>. Zuul is</p>
<blockquote>
<p>... a program that drives continuous integration, delivery, and deployment systems with a focus on project gating and interrelated projects.</p>
</blockquote>
<p>While quite heavy, it is a means to actually execute and evaluate the result of a proposed script. This provides more meaningful feedback, but is of course more onerous in terms of setup and maintenance.</p>

CC BY-SA 4.0
2020-12-28T15:51:32.977Z
The https://github.com/github/super-linter includes shellcheck and is designed to work as a github action already.
chicks
CC BY-SA 4.0
2020-12-29T02:51:18.833Z
Thanks for the input.  What I am looking for is not a linter or unit test for the scripts submitted, although very helpful before submitting for review, but a tool for peer review and approval to run.
JeffJen
CC BY-SA 4.0
2020-12-29T05:21:41.820Z
Thanks for the clarification. I'll update the answer.
Bruce Becker
CC BY-SA 4.0
2020-12-28T10:37:41.743Z
2020-12-29T06:14:44.660Z
2020-12-29T06:14:44.660Z
Bruce Becker
<p>Is there a good web console or tool that would help enable us to review Shell Scripts?</p>
<p>Usually when maintaining a system, we would run scripts that are managed, or we could run scripts that run only once.  However, these scripts must go through a vetting process to make sure they are secure, compliant, and won't create an issue.</p>
<p>We could of course create a git repo and create PR each time we want to run a script, but I am looking for a way for our members to submit scripts without fussing too much about format or folder structure.</p>

<shell-script><toolchain>
Suggestions for a good run command review console
JeffJen
# Suggestions for a good run command review console

(Asked by: username_0 on 2020-12-28)

Is there a good web console or tool that would help enable us to review Shell Scripts?

Usually when maintaining a system, we would run scripts that are managed, or we could run scripts that run only once. However, these scripts must go through a vetting process to make sure they are secure, compliant, and won't create an issue.

We could of course create a git repo and create PR each time we want to run a script, but I am looking for a way for our members to submit scripts without fussing too much about format or folder structure.

**Tags:** shell-script, toolchain


---

## 1 answers

### Answer by username_1 on 2020-12-28. Score: 3

> I am looking for a way for our members to submit scripts without fussing too much about format or folder structure.

It sounds like you need some combination of testing and linting, perhaps with a few utility scripts to organise and gate content from landing in the repo.

The "Vetting process" you mention sounds to me exactly like "tests need to pass on the scripts". A widely-used framework to write such tests is the Bash Automated Testing System - [BATS](https://github.com/sstephenson/bats).

It would be up to you to write the tests to check whether, as you desire, these scripts are "secure, compliant and won't create an issue", but at least you have a framework for generating and running them.

At a more superficial level, you could use the [Shellcheck](https://github.com/koalaman/shellcheck) linter to assert that any proposed new code adheres to whatever set of common rules you adopt in your community.

Pulling these together into a GitHub action (*e.g.* using <https://github.com/github/super-linter>), or a git pre-commit hook *etc* could be a good way to add a quick inspection to new contributions, and help maintainers.

These would provide quantitative measures of correctness. In order to also provide some qualitative or more subjective measures of acceptance, this would depend greatly on the operating environment and which tools would fit naturally into yours.

However, some tools do attempt to address this need by design. Without further knowledge of the environment it's difficult to provide concrete answers, but here is a comparison of two options:

## GitHub, GitLab requests

Assuming the code is destined for a GitHub or GitLab repo, GitHub or GitLab itself could of course be used as the "review console". A contributor would fork the repo, send a new contribution in the form of a PR against the repo, and then the checks referred to above would be executed.

The actions could take care of the organisation, based on some internal convention, *e.g.* using labels, *i.e.* "file scripts in PRs labelled `admin` in the `admin` directory".

## Gerrit

Another purpose-built tool to manage code contributions is [Gerrit](https://www.gerritcodereview.com/). Gerrit is heavily backed by git workflow and may not be relevant, but I mention it since it's one of the first such peer-review systems for software.

As described on the Gerrit website, a [similar workflow is followed](https://gerrit-review.googlesource.com/Documentation/intro-gerrit-walkthrough.html):

> Making the Change
>
> Creating the Review
>
> Reviewing the Change
>
> Reworking the Change
>
> Verifying the Change
>
> Submitting the Change
>
> Next Steps

Much of the actual work here is done by the reviewer or contributor, and Gerrit serves to organise their collaboration.

I suspect that neither of these corresponds exactly to what you are asking for, though, however a **general purpose** tool to which **arbitrary** contributions can be submitted is a big ask and likely a mirage.

It seems more feasible that this should be achieved by adopting shared conventions in existing code collaboration platforms rather than a dedicated service to manage ingestion.

---

Finally, you mention:

> Usually when maintaining a system...

If you meant "maintaining a configuration state of a system", perhaps an approach with [Zuul](https://zuul-ci.org/docs/zuul/index.html). Zuul is

> ... a program that drives continuous integration, delivery, and deployment systems with a focus on project gating and interrelated projects.

While quite heavy, it is a means to actually execute and evaluate the result of a proposed script. This provides more meaningful feedback, but is of course more onerous in terms of setup and maintenance.

> **Comments:**
> **username_2**: The https://github.com/github/super-linter includes shellcheck and is designed to work as a github action already.  
> **username_0**: Thanks for the input.  What I am looking for is not a linter or unit test for the scripts submitted, although very helpful before submitting for review, but a tool for peer review and approval to run.  
> **username_1**: Thanks for the clarification. I'll update the answer.  

---

