-
Notifications
You must be signed in to change notification settings - Fork 186
Trigger Build #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger Build #73
Conversation
DryRun Security SummaryThe pull request introduces a GitHub Actions workflow for running an Amplify Security Scanner on the repository, demonstrating a proactive approach to application security by automatically scanning code changes on pull requests and branch pushes. Expand for full summarySummary: The code change introduced in this pull request is related to a GitHub Actions workflow that runs a security scan on the Amplify application. The workflow is triggered on pull requests, manual workflow dispatches, and pushes to the "master" and "main" branches, and it requires read access to the repository contents and write access to the GitHub Actions ID token. The main job in the workflow is the "amplify-security-scan" job, which runs on the latest Ubuntu environment and uses the "amplify-security/runner-action" action to likely run the Amplify Security Scanner on the codebase. The workflow also includes exclusions for forked repositories and the "dependabot[bot]" user, which is a reasonable precaution. From an application security perspective, the inclusion of this workflow demonstrates a proactive approach to application security, as the team has set up an automated security scanning process as part of their development pipeline. However, there is a possibility of false positive findings, which may require manual review and triage, and the scope of the scanning is limited to the changes introduced in the pull request or pushed to the "master" and "main" branches. It would be beneficial to also have a scheduled or periodic full-repository scan to ensure comprehensive coverage. Files Changed:
Code AnalysisWe ran |
path: amplify-sast.json | ||
retention-days: 7 | ||
- name: Checkout | ||
uses: actions/checkout@v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static Code Analysis Risk: Software and Data Integrity Failures - GitHub actions artipacked vulnerability
Detected local filesystem git credential storage on GitHub Actions, as well as potential avenues for unintentional persistence of credentials in artifacts. By default, using actions/checkout
causes a credential to be persisted in the checked-out repo's .git/config
, so that subsequent git operations can be authenticated. Subsequent steps may accidentally publicly persist .git/config
, e.g. by including it in a publicly accessible artifact via actions/upload-artifact
. However, even without this, persisting the credential in the .git/config
is non-ideal unless actually needed. To fix, add persist-credentials: false
inside a with
section in this step.
Severity: Medium
Status: Open 🔴
References:
Suggested reviewers 🧐: @confusedcrib
Take action by replying with an [arnica] command 💬
Actions
Use [arnica]
or [a]
to interact with the Arnica bot to acknowledge or dismiss code risks.
[arnica] ack <message>
Acknowledge the finding as a valid code risk.
Examples
[arnica] ack looking into it
[a] ack triaged by the security team
[arnica] dismiss <fp
|accept
|capacity
> <message>
Dismiss the risk with a reason.
-
fp
: False positive, i.e. the result is incorrect and indicates no actual risk. -
accept
: Tolerable risk, i.e. risk severity is lower than what has been reported or is accepted as it stands. -
capacity
: No capacity, i.e. leave me alone, please.
Examples
[arnica] dismiss fp test function
[arnica] dismiss accept ChatGPT assures us that we will be just fine
[a] dismiss capacity not enough caffeine to fix it
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Amplify Runner | ||
uses: amplify-security/runner-action@main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue identified by the Semgrep linter is that the GitHub action amplify-security/runner-action@main
is being referenced using a branch name (main
). This practice can lead to security vulnerabilities, as the contents of the branch may change over time, potentially introducing breaking changes or malicious code. To mitigate this risk, it's recommended to pin the action to a specific commit SHA, ensuring that the action will always execute the same code.
Here's a code suggestion to fix the issue by replacing @main
with a specific commit SHA (you would need to replace COMMIT_SHA
with the actual SHA of the commit you want to pin to):
uses: amplify-security/runner-action@main | |
uses: amplify-security/runner-action@COMMIT_SHA |
This comment was generated by an experimental AI tool.
No description provided.