📦 EqualifyEverything / integration-axe

📄 SCRATCHES.md · 56 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56


- [ ] Axe CLI Response Handling
- [ ] Send response to Rabbit
- [ ] Set up rabbit queue
- [ ] Set up queue to Postgres
- [ ] Set up Postgres inserter
- [ ]
- [ ]



Add to Prometheus Config File

scrape_configs:
  - job_name: 'Docker_Container_Name'
    static_configs:
      - targets: ['localhost:8083']
    metrics_path: '/metrics'

    Need to change localhost to container name or somethign like that - auto config type thing


    --##### Title



    def axe_scan(url):
    logger.debug(f'🌟 Starting to process: {url}')
    # Set up Chrome options
    chrome_options = Options()
    chrome_options.add_argument('--no-sandbox')
    chrome_options.add_argument('--disable-dev-shm-usage')
    chrome_options.add_argument('--headless')
    chrome_options.add_argument('--disable-gpu')
    chrome_options.add_argument('--window-size=1920,1080')

    # Create a Chrome driver instance
    driver = webdriver.Chrome('/usr/local/bin/chromedriver', options=chrome_options)

    # Load the web page
    driver.get(url)

    # Run Axe
    axe = Axe(driver)
    axe.inject()
    results = axe.run()

    # Close the browser
    driver.quit()

    logger.info(f'✨ Results for {url}: {results}')

    # Send to Streamlining
    response = streamline_response(results)