
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
campfire-cli
Advanced tools
Campfire automates the creation and teardown of deploy previews for your application, and comes with an integrated feedback interface to make collaborative teamwork possible. We support serverless applications with a Dockerfile and provision resources on AWS.
To learn more, check out our case study.
8080$ npm install -g campfire-cli
Run campfire setup
Input your AWS Region and domain for Campfire to use.
A server will be started at localhost on port 3000. You will be directed to register Campfire's GitHub App by visting localhost:3000 in your browser. You will be directed to GitHub where you will have to enter a unique name for the GitHub Application. This will be the name of the Campfire bot that posts comments on pull requests.
Campfire will request an AWS SSL certificate. The certificate must be validated through DNS verification on your domain host.
setup process will not continue until the certificate is verified.Once verified setup will proceed to provision all other AWS resources.
Two additional CNAME records with hosts for \*.campfire-preview and campfire will be output. These records should also be added to your domain and be set to reference the application load balancer.
It may take around 5 - 10 minutes for AWS to complete the stack build.
[!IMPORTANT]
GitHub App Installation
Make sure the Campfire GitHub App you registered during
setupis installed and has access to the GitHub repository you are initializing. You have the option to install the GitHub App for all repositories or only selected repositories.User/Organization Settings > Developer Settings > Github Apps > Edit > Install App
In order for Campfire features to function properly, we require users to have the Campfire SDK embedded into their applications. There are two ways to embed the SDK:
npm packageInstall the Campfire SDK through your CLI:
npm install campfire-sdk
Create an instance of the Campfire SDK in a script:
import CampfireSDK from 'campfire-sdk'
new CampfireSDK()
Alternatively, import the SDK in a HTML file using our CDN:
<script type="module">
import CampfireSDK from 'https://cdn.jsdelivr.net/npm/campfire-sdk@1.0.0/+esm'
new CampfireSDK();
</script>
For React applications, create the instance within a useEffect hook:
import CampfireSDK from 'campfire-sdk'
import {useEffect} from 'react'
useEffect(() => {
new CampfireSDK()
}, [])
Navigate to the root of your project repository.
Run campfire init
Enter the name of your application. The name you provide will correspond to the cluster created in AWS Elastic Container Service.
Campfire will build the workflow files for your project and place them in a new .github directory.
Commit and push the directory to your GitHub repository.
Add the AWS Access Keys that are output to your project's Github repository as secrets. See Environment Variables step 1 below for instructions on creating GitHub secrets.
All future pull requests made will now generate Campfire deploy previews.
[!NOTE]
Environment Variables
If your application references environment variables that you don't want exposed in your GitHub repo, add them as GitHub Secrets.
Create GitHub Secrets
Navigate to the main page of your repository
Settings > Secrets > Actions > New repository secret
Add your environment variable(s)
Go to
.github/workflows/create_preview.yml.Add your environment variable as a GitHub Action
envvariable:env: MY_ENV_VAR: ${{ secrets.MY_ENV_VAR }} # ...Reference in Task Definition
Go to
.github/actions/deploy-preview/action.yml.Go to line 52
'environment': []Add JSON for your environemnt variable key/value pair to the
environmentarray. The'value'corresponds to the name you gave yourenvvariable in step 2.'environment': [{'name': 'MY_ENV_VAR', 'value': $MY_ENV_VAR}]
campfire setupProvisions the AWS resources required for Campfire.
This command creates the underlying AWS infrastructure to support future deploy previews. This includes the following:
| List of Resources | |
|---|---|
| IAM Roles (2) | REST API Gateway |
| IAM User (1) | ECS Cluster |
| Non-default VPC | ECS Service |
| Route Table | ECS Task Definition |
| Application Load Balancer (ALB) | ECR Repositories |
| ALB Listener | Log Groups |
| ALB Listener Rules | EC2 Target Groups |
| TLS/SSL Certificates | Lambda Functions |
| Internet Gateway | Lambda Permissions |
| Security Groups | S3 Buckets |
| Subnets | Secrets Manager |
NOTE: The IAM User configured with your AWS CLI must have write permissions for the resources above.
See Configuring Campfire above for more details on the campfire setup process
See here for a complete list of resources provisioned.
campfire initInitializes Campfire in your project repository
Run it from the root directory of your repository and follow the prompts for each step of the initialization process.
See Using Campfire with your application above for more details on the campfire init process
campfire listLists all project repositories that have been initialized with Campfire. The names listed are all ECS Clusters that were created for each project during campfire init.
campfire destroyDeletes all AWS resources provisioned from campfire setup and ECS clusters created in campfire init.
Run command after closing all open pull requests for initialized projects.
Users have the option to delete secrets created in AWS Secrets Manager.
setup) until these secrets are deleted. These secrets are scheduled to be deleted in seven days.If you plan on using Campfire again in the near future, we advise not to delete the secrets.
campfire help [COMMAND]Display usage and description for a Campfire command.
setup command hanging at Provisioning AWS Resources?Navigate to your AWS CloudFormation console. Click on the campfire stack created by the setup command and click on Detect Root Cause.
Any information or error logs relating to the CloudFormation stack can be found here.
If the stack creation rolled back due to Insufficient IAM permissions, it is likely that the IAM User configured with your AWS CLI does not have the specified permission. Navigate to the AWS IAM console and attach the appropriate permissions to your IAM User.
Make sure the Campfire GitHub App has been installed to the repository. See GitHub App Installation.
Verify that the repository contains your AWS Access Key and AWS Private Access Key as repository secrets. These credentials are output during campfire init.
🌲🌳🌲 ⛺💬🔥⛺ 🌲🌳🌲
FAQs
Campfire CLI
The npm package campfire-cli receives a total of 19 weekly downloads. As such, campfire-cli popularity was classified as not popular.
We found that campfire-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.