Skip to content
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

V1.0.0 rc release #9

Merged
merged 24 commits into from
Jul 30, 2024
Merged

V1.0.0 rc release #9

merged 24 commits into from
Jul 30, 2024

Conversation

blink-zero
Copy link
Owner

Added

  • History search for VM status DB value
  • Password visibility toggle for post-deployment change password
  • Support for Update OS, Change Password, and Increase disk size operations
  • Playbook edit functionality
  • Confirmation for VM restart in history.html
  • Paramiko v3.4.0 dependency
  • Image human name to History model

Changed

  • Overall theme overhaul
  • Updated various templates and settings tabs to match overall theme
  • Updated VM images form and user.html CSS to match theme
  • Increased height of Playbook View modal and Edit Playbook modal
  • Widened ansible log modal
  • Modified links on home dashboard to filter completed, running, and other statuses
  • Updated VM history DB model and details modal
  • Updated README.md key features area

Fixed

  • Uploading image bug when uploading with suffix brackets on zip files
  • Server Error 500 on admin user deletion, now showing flash message instead

Removed

  • Kali 2024.1 Image (moved to community repository)
  • Unnecessary comments in code

…failed builds depending on what the user selects
@blink-zero blink-zero self-assigned this Jul 30, 2024
@blink-zero blink-zero added the enhancement New feature or request label Jul 30, 2024
Comment on lines +134 to +142
card.innerHTML = `
<div class="card-body d-flex align-items-center p-3">
<img src="/static/images/64x64/${vm.imageiconname}" alt="${vm.imagetype}" class="vm-image-icon me-3">
<div class="flex-grow-1">
<h5 class="card-title mb-1">${vm.hostname}</h5>
<p class="card-text mb-0"><small>${vm.ipaddress} | ${vm.cpu} CPU | ${vm.ram} MB RAM</small></p>
</div>
</div>
`;

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML Medium

DOM text
is reinterpreted as HTML without escaping meta-characters.
DOM text
is reinterpreted as HTML without escaping meta-characters.
DOM text
is reinterpreted as HTML without escaping meta-characters.
DOM text
is reinterpreted as HTML without escaping meta-characters.
DOM text
is reinterpreted as HTML without escaping meta-characters.
Comment on lines +120 to +128
card.innerHTML = `
<div class="card-body d-flex align-items-center p-3">
<img src="/static/images/64x64/${vm.imageiconname}" alt="${vm.imagetype}" class="vm-image-icon me-3">
<div class="flex-grow-1">
<h5 class="card-title mb-1">${vm.hostname}</h5>
<p class="card-text mb-0"><small>${vm.ipaddress} | ${vm.cpu} CPU | ${vm.ram} MB RAM</small></p>
</div>
</div>
`;

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML Medium

DOM text
is reinterpreted as HTML without escaping meta-characters.
DOM text
is reinterpreted as HTML without escaping meta-characters.
DOM text
is reinterpreted as HTML without escaping meta-characters.
DOM text
is reinterpreted as HTML without escaping meta-characters.
DOM text
is reinterpreted as HTML without escaping meta-characters.
return jsonify({'success': True, 'message': 'VM restart initiated successfully.'})
except Exception as e:
log_json('ERROR', f'Failed to restart VM ID: {vm_id}', error=str(e))
return jsonify({'success': False, 'message': f'Failed to restart VM: {str(e)}'}), 500

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.
except Exception as e:
db.session.rollback()
log_json('ERROR', 'VMware configuration update failed', error=str(e), traceback=traceback.format_exc())
return jsonify({'success': False, 'message': f'VMware configuration update failed: {str(e)}'}), 500

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.
file.write(content)
return jsonify({'success': True, 'message': 'Playbook saved successfully'})
except Exception as e:
return jsonify({'success': False, 'message': str(e)}), 500

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.
except Exception as e:
db.session.rollback()
log_json('ERROR', 'Template passwords update failed', error=str(e))
return jsonify({'success': False, 'message': f'Password update failed: {str(e)}'}), 500

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.
except ssl.SSLError as e:
log_json('ERROR', 'VMware connection test failed: SSL error',
vcenter_server=vcenter_server, username=vcenter_username, error=str(e))
return jsonify({'success': False, 'message': f'SSL Error: {str(e)}. Consider using a valid SSL certificate or updating your SSL configuration.'}), 500

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.
except Exception as e:
log_json('ERROR', 'VMware connection test failed',
vcenter_server=vcenter_server, username=vcenter_username, error=str(e))
return jsonify({'success': False, 'message': f'Connection failed: {str(e)}'}), 500

Check warning

Code scanning / CodeQL

Information exposure through an exception Medium

Stack trace information
flows to this location and may be exposed to an external user.
try:
output.append(f"Starting Linux update process for VM {vm_record.hostname}...")
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

Check failure

Code scanning / CodeQL

Accepting unknown SSH host keys when using Paramiko High

Setting missing host key policy to AutoAddPolicy may be unsafe.
ssh = None
try:
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

Check failure

Code scanning / CodeQL

Accepting unknown SSH host keys when using Paramiko High

Setting missing host key policy to AutoAddPolicy may be unsafe.
log_json('INFO', f"Started expand disk on {vm_record.hostname}", vm_id=vm_record.id)

ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

Check failure

Code scanning / CodeQL

Accepting unknown SSH host keys when using Paramiko High

Setting missing host key policy to AutoAddPolicy may be unsafe.
@blink-zero blink-zero marked this pull request as ready for review July 30, 2024 08:40
@blink-zero blink-zero merged commit cedc380 into main Jul 30, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant