Skip to content

Commit e69ac54

Browse files
refactor: update module path from shells to artemis
- Changed all import paths from github.com/CodeMonkeyCybersecurity/shells to artemis - Updated repository URLs in documentation and README - Added logger adapter for auth package to bridge interface differences
1 parent fb4beee commit e69ac54

File tree

336 files changed

+1443
-1889
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

336 files changed

+1443
-1889
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ artemis uses **otelzap** (OpenTelemetry + Zap) for ALL output, including user-fa
368368
Every package should initialize a logger with a component name:
369369

370370
```go
371-
import "github.com/CodeMonkeyCybersecurity/shells/internal/logger"
371+
import "github.com/CodeMonkeyCybersecurity/artemis/internal/logger"
372372

373373
// In main/command functions
374374
log, err := logger.New(cfg.Logger)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Shells is a comprehensive security scanning platform designed for bug bounty hun
1313

1414
```bash
1515
# Clone and run install script (handles everything automatically)
16-
git clone https://github.com/CodeMonkeyCybersecurity/shells
16+
git clone https://github.com/CodeMonkeyCybersecurity/artemis
1717
cd shells
1818
./install.sh
1919

@@ -73,7 +73,7 @@ artemis 192.168.1.0/24 # Scan IP range
7373

7474
```bash
7575
# Clone and install (one command does it all!)
76-
git clone https://github.com/CodeMonkeyCybersecurity/shells
76+
git clone https://github.com/CodeMonkeyCybersecurity/artemis
7777
cd shells
7878
./install.sh
7979

@@ -110,7 +110,7 @@ artemis example.com
110110

111111
```bash
112112
# Clone repository
113-
git clone https://github.com/CodeMonkeyCybersecurity/shells
113+
git clone https://github.com/CodeMonkeyCybersecurity/artemis
114114
cd shells
115115

116116
# Build binary
@@ -455,7 +455,7 @@ We welcome contributions! Please:
455455

456456
## Support
457457

458-
- **Issues**: [GitHub Issues](https://github.com/CodeMonkeyCybersecurity/shells/issues)
458+
- **Issues**: [GitHub Issues](https://github.com/CodeMonkeyCybersecurity/artemis/issues)
459459
- **Documentation**: See `/docs` directory
460460
- **Contact**: Code Monkey Cybersecurity
461461

cmd/atomic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"os"
77
"time"
88

9-
"github.com/CodeMonkeyCybersecurity/shells/pkg/integrations/atomic"
9+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/integrations/atomic"
1010
"github.com/spf13/cobra"
1111
)
1212

cmd/auth.go

Lines changed: 58 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,60 @@
11
package cmd
22

33
import (
4-
"encoding/json"
5-
"fmt"
6-
"net/http"
7-
"os"
8-
"strings"
9-
"time"
10-
11-
"github.com/CodeMonkeyCybersecurity/shells/internal/config"
12-
"github.com/CodeMonkeyCybersecurity/shells/internal/logger"
13-
"github.com/CodeMonkeyCybersecurity/shells/pkg/auth/common"
14-
"github.com/CodeMonkeyCybersecurity/shells/pkg/auth/discovery"
15-
"github.com/CodeMonkeyCybersecurity/shells/pkg/auth/federation"
16-
"github.com/CodeMonkeyCybersecurity/shells/pkg/auth/oauth2"
17-
"github.com/CodeMonkeyCybersecurity/shells/pkg/auth/saml"
18-
"github.com/CodeMonkeyCybersecurity/shells/pkg/auth/webauthn"
19-
"github.com/CodeMonkeyCybersecurity/shells/pkg/types"
20-
"github.com/google/uuid"
21-
"github.com/spf13/cobra"
4+
"encoding/json"
5+
"fmt"
6+
"net/http"
7+
"os"
8+
"strings"
9+
"time"
10+
11+
"github.com/CodeMonkeyCybersecurity/artemis/internal/config"
12+
"github.com/CodeMonkeyCybersecurity/artemis/internal/logger"
13+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/auth/common"
14+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/auth/discovery"
15+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/auth/federation"
16+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/auth/oauth2"
17+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/auth/saml"
18+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/auth/webauthn"
19+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/types"
20+
"github.com/google/uuid"
21+
"github.com/spf13/cobra"
2222
)
2323

24+
type authLoggerAdapter struct {
25+
base *logger.Logger
26+
}
27+
28+
func (a *authLoggerAdapter) Info(msg string, keysAndValues ...interface{}) {
29+
if a.base != nil {
30+
a.base.Infow(msg, keysAndValues...)
31+
}
32+
}
33+
34+
func (a *authLoggerAdapter) Error(msg string, keysAndValues ...interface{}) {
35+
if a.base != nil {
36+
a.base.Errorw(msg, keysAndValues...)
37+
}
38+
}
39+
40+
func (a *authLoggerAdapter) Debug(msg string, keysAndValues ...interface{}) {
41+
if a.base != nil {
42+
a.base.Debugw(msg, keysAndValues...)
43+
}
44+
}
45+
46+
func adaptAuthLogger(l *logger.Logger) common.Logger {
47+
if l == nil {
48+
return nil
49+
}
50+
return &authLoggerAdapter{base: l}
51+
}
52+
2453
// authCmd represents the auth command
2554
var authCmd = &cobra.Command{
26-
Use: "auth",
27-
Short: "Test authentication and identity systems",
28-
Long: `Comprehensive authentication security testing framework for modern authentication protocols.
55+
Use: "auth",
56+
Short: "Test authentication and identity systems",
57+
Long: `Comprehensive authentication security testing framework for modern authentication protocols.
2958
3059
This command provides advanced testing capabilities for:
3160
- SAML (including Golden SAML attacks)
@@ -98,14 +127,14 @@ Examples:
98127
}
99128

100129
// Also run legacy discovery for federation
101-
crossAnalyzer := common.NewCrossProtocolAnalyzer(log)
130+
crossAnalyzer := common.NewCrossProtocolAnalyzer(adaptAuthLogger(log))
102131
legacyConfig, _ := crossAnalyzer.AnalyzeTarget(target)
103132

104133
domain := extractDomain(target)
105134
httpClient := &http.Client{
106135
Timeout: 30 * time.Second,
107136
}
108-
discoverer := federation.NewFederationDiscoverer(httpClient, log)
137+
discoverer := federation.NewFederationDiscoverer(httpClient, adaptAuthLogger(log))
109138
federationResult := discoverer.DiscoverAllProviders(domain)
110139

111140
// Create combined result
@@ -312,14 +341,14 @@ Examples:
312341
)
313342

314343
// Analyze target for vulnerabilities
315-
crossAnalyzer := common.NewCrossProtocolAnalyzer(log)
344+
crossAnalyzer := common.NewCrossProtocolAnalyzer(adaptAuthLogger(log))
316345
config, analyzeErr := crossAnalyzer.AnalyzeTarget(target)
317346
if analyzeErr != nil {
318347
return fmt.Errorf("target analysis failed: %w", analyzeErr)
319348
}
320349

321350
// Find attack chains
322-
chainAnalyzer := common.NewAuthChainAnalyzer(log)
351+
chainAnalyzer := common.NewAuthChainAnalyzer(adaptAuthLogger(log))
323352
chains := chainAnalyzer.FindBypassChains(config.Configuration, config.Vulnerabilities)
324353

325354
// Create result
@@ -473,22 +502,22 @@ type ChainSummary struct {
473502
// Test runner functions
474503

475504
func runSAMLTests(target string, log *logger.Logger) (*common.AuthReport, error) {
476-
scanner := saml.NewSAMLScanner(log)
505+
scanner := saml.NewSAMLScanner(adaptAuthLogger(log))
477506
return scanner.Scan(target, map[string]interface{}{})
478507
}
479508

480509
func runOAuth2Tests(target string, log *logger.Logger) (*common.AuthReport, error) {
481-
scanner := oauth2.NewOAuth2Scanner(log)
510+
scanner := oauth2.NewOAuth2Scanner(adaptAuthLogger(log))
482511
return scanner.Scan(target, map[string]interface{}{})
483512
}
484513

485514
func runWebAuthnTests(target string, log *logger.Logger) (*common.AuthReport, error) {
486-
scanner := webauthn.NewWebAuthnScanner(log)
515+
scanner := webauthn.NewWebAuthnScanner(adaptAuthLogger(log))
487516
return scanner.Scan(target, map[string]interface{}{})
488517
}
489518

490519
func runAllTests(target string, log *logger.Logger) (*common.AuthReport, error) {
491-
crossAnalyzer := common.NewCrossProtocolAnalyzer(log)
520+
crossAnalyzer := common.NewCrossProtocolAnalyzer(adaptAuthLogger(log))
492521
return crossAnalyzer.AnalyzeTarget(target)
493522
}
494523

cmd/auth_test.go

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ import (
1212
"testing"
1313
"time"
1414

15-
"github.com/CodeMonkeyCybersecurity/shells/internal/config"
16-
"github.com/CodeMonkeyCybersecurity/shells/internal/logger"
17-
"github.com/CodeMonkeyCybersecurity/shells/pkg/auth/common"
15+
"github.com/CodeMonkeyCybersecurity/artemis/internal/config"
16+
"github.com/CodeMonkeyCybersecurity/artemis/internal/logger"
17+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/auth/common"
1818
"github.com/spf13/cobra"
1919
)
2020

2121
// TestMain sets up test environment
2222
func TestMain(m *testing.M) {
2323
// Initialize logger for tests
24-
log, err := logger.New(config.LoggerConfig{
24+
l, err := logger.New(config.LoggerConfig{
2525
Level: "error", // Quiet logging during tests
2626
Format: "json",
2727
})
@@ -30,7 +30,7 @@ func TestMain(m *testing.M) {
3030
}
3131

3232
// Set global logger
33-
rootLogger = log
33+
log = l
3434

3535
// Run tests
3636
os.Exit(m.Run())
@@ -105,7 +105,8 @@ func TestAuthDiscoverCommand(t *testing.T) {
105105
}
106106

107107
// Simulate discovery
108-
t.Logf("Discovering auth endpoints for: %s", target)
108+
l := logger.FromContext(context.Background())
109+
l.Debugf("Discovering auth endpoints for: %s", target)
109110
return nil
110111
},
111112
}
@@ -132,7 +133,7 @@ func TestAuthDiscoverCommand(t *testing.T) {
132133
// TestAuthTestCommand_SAML tests SAML vulnerability testing
133134
func TestAuthTestCommand_SAML(t *testing.T) {
134135
// Create mock SAML server
135-
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
136+
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
136137
switch {
137138
case strings.Contains(r.URL.Path, "/saml/metadata"):
138139
// Return SAML metadata
@@ -154,7 +155,8 @@ func TestAuthTestCommand_SAML(t *testing.T) {
154155
default:
155156
w.WriteHeader(http.StatusNotFound)
156157
}
157-
}))
158+
})
159+
server := httptest.NewServer(handler)
158160
defer server.Close()
159161

160162
t.Run("detect Golden SAML vulnerability", func(t *testing.T) {
@@ -170,30 +172,32 @@ func TestAuthTestCommand_SAML(t *testing.T) {
170172
case <-ctx.Done():
171173
t.Fatal("Test timeout")
172174
default:
173-
t.Logf("SAML scanner integration test for target: %s", target)
175+
l := logger.FromContext(ctx)
176+
l.Debugf("SAML scanner integration test for target: %s", target)
174177
// Integration test passes if we can set up the mock server
175178
}
176179
})
177180

178181
t.Run("detect XML Signature Wrapping", func(t *testing.T) {
179182
target := server.URL
180-
t.Logf("Testing XML Signature Wrapping detection for: %s", target)
183+
l := logger.FromContext(context.Background())
184+
l.Debugf("Testing XML Signature Wrapping detection for: %s", target)
181185
// XSW attack test - verify scanner detects comment-based XSW
182186
})
183187
}
184188

185189
// TestAuthTestCommand_OAuth2JWT tests OAuth2/JWT vulnerability testing
186190
func TestAuthTestCommand_OAuth2JWT(t *testing.T) {
187-
// Create mock OAuth2 server
188-
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
191+
var issuer string
192+
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
189193
switch {
190194
case strings.Contains(r.URL.Path, "/.well-known/openid-configuration"):
191195
// Return OIDC discovery document
192196
config := map[string]interface{}{
193-
"issuer": server.URL,
194-
"authorization_endpoint": server.URL + "/oauth/authorize",
195-
"token_endpoint": server.URL + "/oauth/token",
196-
"jwks_uri": server.URL + "/oauth/jwks",
197+
"issuer": issuer,
198+
"authorization_endpoint": issuer + "/oauth/authorize",
199+
"token_endpoint": issuer + "/oauth/token",
200+
"jwks_uri": issuer + "/oauth/jwks",
197201
}
198202
json.NewEncoder(w).Encode(config)
199203

@@ -225,7 +229,9 @@ func TestAuthTestCommand_OAuth2JWT(t *testing.T) {
225229
default:
226230
w.WriteHeader(http.StatusNotFound)
227231
}
228-
}))
232+
})
233+
server := httptest.NewServer(handler)
234+
issuer = server.URL
229235
defer server.Close()
230236

231237
t.Run("detect JWT algorithm confusion", func(t *testing.T) {

cmd/boileau.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"strings"
1010
"time"
1111

12-
"github.com/CodeMonkeyCybersecurity/shells/pkg/cli/adapters"
13-
"github.com/CodeMonkeyCybersecurity/shells/pkg/boileau"
14-
"github.com/CodeMonkeyCybersecurity/shells/pkg/types"
12+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/cli/adapters"
13+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/boileau"
14+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/types"
1515
"github.com/spf13/cobra"
1616
)
1717

cmd/bugbounty/mode.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ import (
2424
"strings"
2525
"time"
2626

27-
"github.com/CodeMonkeyCybersecurity/shells/internal/core"
28-
"github.com/CodeMonkeyCybersecurity/shells/internal/discovery"
29-
"github.com/CodeMonkeyCybersecurity/shells/internal/httpclient"
30-
"github.com/CodeMonkeyCybersecurity/shells/internal/logger"
31-
"github.com/CodeMonkeyCybersecurity/shells/internal/vulntest"
32-
"github.com/CodeMonkeyCybersecurity/shells/pkg/types"
27+
"github.com/CodeMonkeyCybersecurity/artemis/internal/core"
28+
"github.com/CodeMonkeyCybersecurity/artemis/internal/discovery"
29+
"github.com/CodeMonkeyCybersecurity/artemis/internal/httpclient"
30+
"github.com/CodeMonkeyCybersecurity/artemis/internal/logger"
31+
"github.com/CodeMonkeyCybersecurity/artemis/internal/vulntest"
32+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/types"
3333
)
3434

3535
// BugBountyTester coordinates bug bounty vulnerability testing.

cmd/cert_enhanced_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"time"
99
"testing"
1010

11-
"github.com/CodeMonkeyCybersecurity/shells/internal/config"
12-
"github.com/CodeMonkeyCybersecurity/shells/internal/logger"
13-
"github.com/CodeMonkeyCybersecurity/shells/pkg/correlation"
11+
"github.com/CodeMonkeyCybersecurity/artemis/internal/config"
12+
"github.com/CodeMonkeyCybersecurity/artemis/internal/logger"
13+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/correlation"
1414
)
1515

1616
func TestCertEnhanced(t *testing.T) {

cmd/certificate_discovery_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import (
1313
"testing"
1414
"time"
1515

16-
"github.com/CodeMonkeyCybersecurity/shells/internal/config"
17-
"github.com/CodeMonkeyCybersecurity/shells/internal/logger"
18-
"github.com/CodeMonkeyCybersecurity/shells/pkg/correlation"
16+
"github.com/CodeMonkeyCybersecurity/artemis/internal/config"
17+
"github.com/CodeMonkeyCybersecurity/artemis/internal/logger"
18+
"github.com/CodeMonkeyCybersecurity/artemis/pkg/correlation"
1919
)
2020

2121
func TestCertificateDiscovery(t *testing.T) {

cmd/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"path/filepath"
77
"strings"
88

9-
"github.com/CodeMonkeyCybersecurity/shells/internal/credentials"
9+
"github.com/CodeMonkeyCybersecurity/artemis/internal/credentials"
1010
"github.com/spf13/cobra"
1111
)
1212

0 commit comments

Comments
 (0)