@vandevlinalfonso/n8n-nodes-cycode
v0.1.3
Published
n8n nodes for Cycode security platform integration
Downloads
14
Maintainers
Readme
n8n-nodes-cycode
This is an n8n community node for integrating with Cycode, a comprehensive security platform for detecting and preventing secrets, vulnerabilities, and security misconfigurations in your code.
n8n is a fair-code licensed workflow automation platform.
Features
- Automatic Token Management: Handles JWT token generation and refresh automatically
- Secure Credential Storage: Client ID and Secret are stored securely with password protection
- Token Caching: Reuses valid tokens to reduce API calls
- Configurable Base URL: Support for different Cycode instances or environments
- Built-in Testing: Validates credentials during setup
Installation
Follow the installation guide in the n8n community nodes documentation.
Option 1: Install via npm (Recommended)
npm install @vandevlinalfonso/n8n-nodes-cycodeOption 2: Manual Installation (for development)
cd ~/.n8n/custom
git clone https://github.com/vandevlinalfonso/n8n-nodes-cycode.git
cd n8n-nodes-cycode
npm install
npm run buildPrerequisites
Before using this node, you need:
- A Cycode account
- API credentials (Client ID and Secret Key)
Getting Cycode API Credentials
- Log in to your Cycode dashboard
- Navigate to Settings → API Keys
- Click Create API Key
- Copy your Client ID and Secret Key
- Store them securely - the Secret Key is only shown once
Configuration
Setting up Credentials in n8n
- In n8n, go to Credentials → New
- Search for "Cycode API"
- Enter your credentials:
- Client ID: Your Cycode API Client ID
- Secret Key: Your Cycode API Secret Key
- API Base URL (optional): Default is
https://api.cycode.com
- Click Save and Test
The credential will automatically:
- Fetch a JWT token from Cycode
- Store the token securely
- Refresh the token automatically before expiry
- Handle authentication for all Cycode API requests
Usage
Once credentials are configured, you can use Cycode with HTTP Request nodes in your workflows.
Example: Get Violations
Use the HTTP Request node with Cycode API credentials to fetch violations and other security data.
How It Works
Token Management
The credential implementation uses a sophisticated token management system:
- Initial Authentication: When first used, the node exchanges your Client ID and Secret for a JWT token
- Token Caching: The token is stored as a hidden field in the credential
- Auto-Refresh: Before each API call, the node checks if the token is still valid (with a 5-minute buffer)
- Seamless Renewal: If the token is expired or about to expire, it's automatically refreshed without user intervention
Security Features
- Password Protection: Secret Key is masked in the UI
- Hidden Token Storage: JWT tokens are stored as hidden fields
- Encrypted at Rest: n8n encrypts all credential data
- Automatic Rotation: Tokens are refreshed automatically
API Coverage
This package currently provides credentials for Cycode API authentication. You can use it with:
- HTTP Request node with Cycode API endpoints
- Custom Cycode operation nodes (when implemented)
Supported Cycode APIs
With these credentials, you can access:
- Secrets Detection API: Scan for exposed secrets
- SCA (Software Composition Analysis) API: Analyze dependencies
- SAST (Static Application Security Testing) API: Scan code for vulnerabilities
- IaC (Infrastructure as Code) API: Check infrastructure configurations
- Violations API: Retrieve and manage security violations
- Projects API: Manage Cycode projects
- Users API: User management
Troubleshooting
"Authentication failed" error
Cause: Invalid Client ID or Secret Key
Solution:
- Verify your credentials in the Cycode dashboard
- Ensure you copied the entire Secret Key (it's long!)
- Check that the API key hasn't been revoked
- Try creating a new API key
Token refresh failures
Cause: Network issues or Cycode API downtime
Solution:
- Check your internet connection
- Verify Cycode API status
- Try saving the credential again to force a token refresh
"No token received" error
Cause: API response format changed or network issue
Solution:
- Update to the latest version of this package
- Check Cycode API documentation for changes
- Report the issue on GitHub
Development
Building from Source
git clone https://github.com/vandevlinalfonso/n8n-nodes-cycode.git
cd n8n-nodes-cycode
npm install
npm run buildFile Structure
n8n-nodes-cycode/
├── credentials/
│ ├── CycodeApi.credentials.ts # Main credential implementation
│ └── cycode.svg # Cycode logo
├── nodes/
│ └── Cycode/ # Future node implementations
├── package.json
├── tsconfig.json
└── README.mdCompatibility
- Minimum n8n version: 1.0.0
- Node.js: >=20.15
- Tested with: n8n 1.82.0+
Resources
License
MIT
Changelog
0.1.0 (Initial Release)
- Cycode API credential support with automatic JWT token management
- Token auto-refresh with 5-minute buffer
- Configurable base URL for different Cycode instances
- Built-in credential testing
Built with ❤️ for the n8n and Cycode communities
